diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateBot.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateBot.g.cs index 31349d1..9243972 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateBot.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminCreateBotResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminCreateBotAsResponseAsync( + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Create bot + /// + /// + /// + /// 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 AdminCreateBotAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminCreateBotResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/bots", baseUri: HttpClient.BaseAddress); @@ -162,6 +184,8 @@ partial void ProcessAdminCreateBotResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -172,6 +196,11 @@ partial void ProcessAdminCreateBotResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -189,6 +218,8 @@ partial void ProcessAdminCreateBotResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -198,8 +229,7 @@ partial void ProcessAdminCreateBotResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -208,6 +238,11 @@ partial void ProcessAdminCreateBotResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -224,14 +259,15 @@ partial void ProcessAdminCreateBotResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -271,6 +307,8 @@ partial void ProcessAdminCreateBotResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -291,6 +329,8 @@ partial void ProcessAdminCreateBotResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -344,6 +384,10 @@ partial void ProcessAdminCreateBotResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -365,6 +409,10 @@ partial void ProcessAdminCreateBotResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateIntegration.g.cs index c4f511d..214a297 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateIntegration.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminCreateIntegrationResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminCreateIntegrationAsResponseAsync( + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Create integration + /// + /// + /// + /// 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 AdminCreateIntegrationAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminCreateIntegrationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/integrations", baseUri: HttpClient.BaseAddress); @@ -162,6 +184,8 @@ partial void ProcessAdminCreateIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -172,6 +196,11 @@ partial void ProcessAdminCreateIntegrationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -189,6 +218,8 @@ partial void ProcessAdminCreateIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -198,8 +229,7 @@ partial void ProcessAdminCreateIntegrationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -208,6 +238,11 @@ partial void ProcessAdminCreateIntegrationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -224,14 +259,15 @@ partial void ProcessAdminCreateIntegrationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -271,6 +307,8 @@ partial void ProcessAdminCreateIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -291,6 +329,8 @@ partial void ProcessAdminCreateIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -344,6 +384,10 @@ partial void ProcessAdminCreateIntegrationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -365,6 +409,10 @@ partial void ProcessAdminCreateIntegrationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspace.g.cs index 8593775..b17f14d 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspace.g.cs @@ -47,6 +47,24 @@ partial void ProcessAdminCreateWorkspaceResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminCreateWorkspaceAsResponseAsync( + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Create workspace + /// + /// + /// 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 AdminCreateWorkspaceAsResponseAsync( + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessAdminCreateWorkspaceResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/workspaces", baseUri: HttpClient.BaseAddress); @@ -155,6 +174,8 @@ partial void ProcessAdminCreateWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +186,11 @@ partial void ProcessAdminCreateWorkspaceResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +208,8 @@ partial void ProcessAdminCreateWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +219,7 @@ partial void ProcessAdminCreateWorkspaceResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +228,11 @@ partial void ProcessAdminCreateWorkspaceResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +249,15 @@ partial void ProcessAdminCreateWorkspaceResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +297,8 @@ partial void ProcessAdminCreateWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +319,8 @@ partial void ProcessAdminCreateWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -337,6 +374,10 @@ partial void ProcessAdminCreateWorkspaceResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -358,6 +399,10 @@ partial void ProcessAdminCreateWorkspaceResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspaceMember.g.cs index 74cf5da..97f725b 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspaceMember.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminCreateWorkspaceMemberAsResponseAsync( + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add a member to the workspace + /// + /// + /// + /// 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 AdminCreateWorkspaceMemberAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/workspace-members", baseUri: HttpClient.BaseAddress); @@ -162,6 +184,8 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -172,6 +196,11 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -189,6 +218,8 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -198,8 +229,7 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -208,6 +238,11 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -224,14 +259,15 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -271,6 +307,8 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -291,6 +329,8 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -344,6 +384,10 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -365,6 +409,10 @@ partial void ProcessAdminCreateWorkspaceMemberResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBot.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBot.g.cs index 37b09ee..75f0d7d 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBot.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminDeleteBotResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminDeleteBotAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete bot + /// + /// + /// + /// + /// 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 AdminDeleteBotAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessAdminDeleteBotResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/bots/{id}", baseUri: HttpClient.BaseAddress); @@ -168,6 +193,8 @@ partial void ProcessAdminDeleteBotResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +205,11 @@ partial void ProcessAdminDeleteBotResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +227,8 @@ partial void ProcessAdminDeleteBotResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +238,7 @@ partial void ProcessAdminDeleteBotResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +247,11 @@ partial void ProcessAdminDeleteBotResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +268,15 @@ partial void ProcessAdminDeleteBotResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +316,8 @@ partial void ProcessAdminDeleteBotResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +338,8 @@ partial void ProcessAdminDeleteBotResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -350,6 +393,10 @@ partial void ProcessAdminDeleteBotResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -371,6 +418,10 @@ partial void ProcessAdminDeleteBotResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBotIssue.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBotIssue.g.cs index 43b2e58..e091835 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBotIssue.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBotIssue.g.cs @@ -59,6 +59,33 @@ partial void ProcessAdminDeleteBotIssueResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminDeleteBotIssueAsResponseAsync( + id: id, + issueId: issueId, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Bot Issue + /// + /// + /// + /// + /// + /// 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 AdminDeleteBotIssueAsResponseAsync( + string id, + string issueId, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessAdminDeleteBotIssueResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/bots/{id}/issues/{issueId}", baseUri: HttpClient.BaseAddress); @@ -174,6 +202,8 @@ partial void ProcessAdminDeleteBotIssueResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +214,11 @@ partial void ProcessAdminDeleteBotIssueResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +236,8 @@ partial void ProcessAdminDeleteBotIssueResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +247,7 @@ partial void ProcessAdminDeleteBotIssueResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +256,11 @@ partial void ProcessAdminDeleteBotIssueResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +277,15 @@ partial void ProcessAdminDeleteBotIssueResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +325,8 @@ partial void ProcessAdminDeleteBotIssueResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +347,8 @@ partial void ProcessAdminDeleteBotIssueResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -356,6 +402,10 @@ partial void ProcessAdminDeleteBotIssueResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -377,6 +427,10 @@ partial void ProcessAdminDeleteBotIssueResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteIntegration.g.cs index 9a4ca6e..3c6c77c 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteIntegration.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminDeleteIntegrationResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminDeleteIntegrationAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete integration + /// + /// + /// + /// + /// 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 AdminDeleteIntegrationAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessAdminDeleteIntegrationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/integrations/{id}", baseUri: HttpClient.BaseAddress); @@ -168,6 +193,8 @@ partial void ProcessAdminDeleteIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +205,11 @@ partial void ProcessAdminDeleteIntegrationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +227,8 @@ partial void ProcessAdminDeleteIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +238,7 @@ partial void ProcessAdminDeleteIntegrationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +247,11 @@ partial void ProcessAdminDeleteIntegrationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +268,15 @@ partial void ProcessAdminDeleteIntegrationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +316,8 @@ partial void ProcessAdminDeleteIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +338,8 @@ partial void ProcessAdminDeleteIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -350,6 +393,10 @@ partial void ProcessAdminDeleteIntegrationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -371,6 +418,10 @@ partial void ProcessAdminDeleteIntegrationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspace.g.cs index e135964..80b2806 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspace.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminDeleteWorkspaceResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminDeleteWorkspaceAsResponseAsync( + id: id, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete workspace + /// + /// + /// + /// 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 AdminDeleteWorkspaceAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminDeleteWorkspaceResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/workspaces/{id}", baseUri: HttpClient.BaseAddress); @@ -161,6 +183,8 @@ partial void ProcessAdminDeleteWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +195,11 @@ partial void ProcessAdminDeleteWorkspaceResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +217,8 @@ partial void ProcessAdminDeleteWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +228,7 @@ partial void ProcessAdminDeleteWorkspaceResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +237,11 @@ partial void ProcessAdminDeleteWorkspaceResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +258,15 @@ partial void ProcessAdminDeleteWorkspaceResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +306,8 @@ partial void ProcessAdminDeleteWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +328,8 @@ partial void ProcessAdminDeleteWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -343,6 +383,10 @@ partial void ProcessAdminDeleteWorkspaceResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -364,6 +408,10 @@ partial void ProcessAdminDeleteWorkspaceResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspaceMember.g.cs index f46f3cb..b2f68f8 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspaceMember.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminDeleteWorkspaceMemberAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Remove a member of a workspace + /// + /// + /// + /// + /// 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 AdminDeleteWorkspaceMemberAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/workspace-members/{id}", baseUri: HttpClient.BaseAddress); @@ -168,6 +193,8 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +205,11 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +227,8 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +238,7 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +247,11 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +268,15 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +316,8 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +338,8 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -350,6 +393,10 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -371,6 +418,10 @@ partial void ProcessAdminDeleteWorkspaceMemberResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAccount.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAccount.g.cs index 2b491ad..bf6f8dd 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAccount.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAccount.g.cs @@ -47,6 +47,24 @@ partial void ProcessAdminGetAccountResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetAccountAsResponseAsync( + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get details of the account authenticating with this endpoint. + /// + /// + /// 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 AdminGetAccountAsResponseAsync( + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessAdminGetAccountResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/account/me", baseUri: HttpClient.BaseAddress); @@ -155,6 +174,8 @@ partial void ProcessAdminGetAccountResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +186,11 @@ partial void ProcessAdminGetAccountResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +208,8 @@ partial void ProcessAdminGetAccountResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +219,7 @@ partial void ProcessAdminGetAccountResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +228,11 @@ partial void ProcessAdminGetAccountResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +249,15 @@ partial void ProcessAdminGetAccountResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +297,8 @@ partial void ProcessAdminGetAccountResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +319,8 @@ partial void ProcessAdminGetAccountResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -337,6 +374,10 @@ partial void ProcessAdminGetAccountResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -358,6 +399,10 @@ partial void ProcessAdminGetAccountResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAuditRecords.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAuditRecords.g.cs index 9696119..ff29e4c 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAuditRecords.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAuditRecords.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminGetAuditRecordsResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetAuditRecordsAsResponseAsync( + id: id, + nextToken: nextToken, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get the audit records of a workspace, sorted from most recent to oldest. + /// + /// + /// + /// + /// 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 AdminGetAuditRecordsAsResponseAsync( + string id, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,11 +110,12 @@ partial void ProcessAdminGetAuditRecordsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/workspaces/{id}/audit-records", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +195,8 @@ partial void ProcessAdminGetAuditRecordsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +207,11 @@ partial void ProcessAdminGetAuditRecordsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +229,8 @@ partial void ProcessAdminGetAuditRecordsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +240,7 @@ partial void ProcessAdminGetAuditRecordsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +249,11 @@ partial void ProcessAdminGetAuditRecordsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +270,15 @@ partial void ProcessAdminGetAuditRecordsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +318,8 @@ partial void ProcessAdminGetAuditRecordsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +340,8 @@ partial void ProcessAdminGetAuditRecordsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -352,6 +395,10 @@ partial void ProcessAdminGetAuditRecordsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -373,6 +420,10 @@ partial void ProcessAdminGetAuditRecordsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBot.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBot.g.cs index 78a64ed..f1bc19a 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBot.g.cs @@ -59,6 +59,33 @@ partial void ProcessAdminGetBotResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetBotAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + shouldMergePlugins: shouldMergePlugins, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get bot details + /// + /// + /// + /// + /// + /// 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 AdminGetBotAsResponseAsync( + string id, + string xWorkspaceId, + bool? shouldMergePlugins = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,11 +118,12 @@ partial void ProcessAdminGetBotResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/bots/{id}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("shouldMergePlugins", shouldMergePlugins?.ToString().ToLowerInvariant()) + .AddOptionalParameter("shouldMergePlugins", shouldMergePlugins?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -177,6 +205,8 @@ partial void ProcessAdminGetBotResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -187,6 +217,11 @@ partial void ProcessAdminGetBotResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -204,6 +239,8 @@ partial void ProcessAdminGetBotResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -213,8 +250,7 @@ partial void ProcessAdminGetBotResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -223,6 +259,11 @@ partial void ProcessAdminGetBotResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -239,14 +280,15 @@ partial void ProcessAdminGetBotResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -286,6 +328,8 @@ partial void ProcessAdminGetBotResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -306,6 +350,8 @@ partial void ProcessAdminGetBotResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -359,6 +405,10 @@ partial void ProcessAdminGetBotResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -380,6 +430,10 @@ partial void ProcessAdminGetBotResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotAnalytics.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotAnalytics.g.cs index e7d5ef1..214b20d 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotAnalytics.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotAnalytics.g.cs @@ -63,6 +63,36 @@ partial void ProcessAdminGetBotAnalyticsResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetBotAnalyticsAsResponseAsync( + id: id, + startDate: startDate, + endDate: endDate, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get bot analytics + /// + /// + /// + /// + /// + /// + /// 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 AdminGetBotAnalyticsAsResponseAsync( + string id, + string startDate, + string endDate, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -96,12 +126,13 @@ partial void ProcessAdminGetBotAnalyticsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/bots/{id}/analytics", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("startDate", startDate) - .AddRequiredParameter("endDate", endDate) + .AddRequiredParameter("endDate", endDate) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -184,6 +215,8 @@ partial void ProcessAdminGetBotAnalyticsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +227,11 @@ partial void ProcessAdminGetBotAnalyticsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +249,8 @@ partial void ProcessAdminGetBotAnalyticsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +260,7 @@ partial void ProcessAdminGetBotAnalyticsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +269,11 @@ partial void ProcessAdminGetBotAnalyticsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +290,15 @@ partial void ProcessAdminGetBotAnalyticsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +338,8 @@ partial void ProcessAdminGetBotAnalyticsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +360,8 @@ partial void ProcessAdminGetBotAnalyticsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -366,6 +415,10 @@ partial void ProcessAdminGetBotAnalyticsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -387,6 +440,10 @@ partial void ProcessAdminGetBotAnalyticsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotIssue.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotIssue.g.cs index 9de6868..c186fbd 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotIssue.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotIssue.g.cs @@ -59,6 +59,33 @@ partial void ProcessAdminGetBotIssueResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetBotIssueAsResponseAsync( + id: id, + issueId: issueId, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get Bot Issue + /// + /// + /// + /// + /// + /// 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 AdminGetBotIssueAsResponseAsync( + string id, + string issueId, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessAdminGetBotIssueResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/bots/{id}/issues/{issueId}", baseUri: HttpClient.BaseAddress); @@ -174,6 +202,8 @@ partial void ProcessAdminGetBotIssueResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +214,11 @@ partial void ProcessAdminGetBotIssueResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +236,8 @@ partial void ProcessAdminGetBotIssueResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +247,7 @@ partial void ProcessAdminGetBotIssueResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +256,11 @@ partial void ProcessAdminGetBotIssueResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +277,15 @@ partial void ProcessAdminGetBotIssueResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +325,8 @@ partial void ProcessAdminGetBotIssueResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +347,8 @@ partial void ProcessAdminGetBotIssueResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -356,6 +402,10 @@ partial void ProcessAdminGetBotIssueResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -377,6 +427,10 @@ partial void ProcessAdminGetBotIssueResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotLogs.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotLogs.g.cs index e8d3f2c..dd58299 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotLogs.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotLogs.g.cs @@ -87,6 +87,54 @@ partial void ProcessAdminGetBotLogsResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetBotLogsAsResponseAsync( + id: id, + timeStart: timeStart, + xWorkspaceId: xWorkspaceId, + timeEnd: timeEnd, + level: level, + userId: userId, + workflowId: workflowId, + conversationId: conversationId, + messageContains: messageContains, + nextToken: nextToken, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get bot logs + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminGetBotLogsAsResponseAsync( + string id, + string timeStart, + string xWorkspaceId, + string? timeEnd = default, + string? level = default, + string? userId = default, + string? workflowId = default, + string? conversationId = default, + string? messageContains = default, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -126,9 +174,10 @@ partial void ProcessAdminGetBotLogsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/bots/{id}/logs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("timeStart", timeStart) .AddOptionalParameter("timeEnd", timeEnd) @@ -137,7 +186,7 @@ partial void ProcessAdminGetBotLogsResponse( .AddOptionalParameter("workflowId", workflowId) .AddOptionalParameter("conversationId", conversationId) .AddOptionalParameter("messageContains", messageContains) - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -226,6 +275,8 @@ partial void ProcessAdminGetBotLogsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -236,6 +287,11 @@ partial void ProcessAdminGetBotLogsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -253,6 +309,8 @@ partial void ProcessAdminGetBotLogsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -262,8 +320,7 @@ partial void ProcessAdminGetBotLogsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +329,11 @@ partial void ProcessAdminGetBotLogsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -288,14 +350,15 @@ partial void ProcessAdminGetBotLogsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -335,6 +398,8 @@ partial void ProcessAdminGetBotLogsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -355,6 +420,8 @@ partial void ProcessAdminGetBotLogsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -408,6 +475,10 @@ partial void ProcessAdminGetBotLogsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -429,6 +500,10 @@ partial void ProcessAdminGetBotLogsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegration.g.cs index 8865b3c..cb6914e 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegration.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminGetIntegrationResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetIntegrationAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get integration + /// + /// + /// + /// + /// 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 AdminGetIntegrationAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessAdminGetIntegrationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/integrations/{id}", baseUri: HttpClient.BaseAddress); @@ -168,6 +193,8 @@ partial void ProcessAdminGetIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +205,11 @@ partial void ProcessAdminGetIntegrationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +227,8 @@ partial void ProcessAdminGetIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +238,7 @@ partial void ProcessAdminGetIntegrationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +247,11 @@ partial void ProcessAdminGetIntegrationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +268,15 @@ partial void ProcessAdminGetIntegrationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +316,8 @@ partial void ProcessAdminGetIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +338,8 @@ partial void ProcessAdminGetIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -350,6 +393,10 @@ partial void ProcessAdminGetIntegrationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -371,6 +418,10 @@ partial void ProcessAdminGetIntegrationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationByName.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationByName.g.cs index e929a95..71034dd 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationByName.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationByName.g.cs @@ -59,6 +59,33 @@ partial void ProcessAdminGetIntegrationByNameResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetIntegrationByNameAsResponseAsync( + name: name, + version: version, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get integration + /// + /// + /// + /// + /// + /// 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 AdminGetIntegrationByNameAsResponseAsync( + string name, + string version, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessAdminGetIntegrationByNameResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/integrations/{name}/{version}", baseUri: HttpClient.BaseAddress); @@ -174,6 +202,8 @@ partial void ProcessAdminGetIntegrationByNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +214,11 @@ partial void ProcessAdminGetIntegrationByNameResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +236,8 @@ partial void ProcessAdminGetIntegrationByNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +247,7 @@ partial void ProcessAdminGetIntegrationByNameResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +256,11 @@ partial void ProcessAdminGetIntegrationByNameResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +277,15 @@ partial void ProcessAdminGetIntegrationByNameResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +325,8 @@ partial void ProcessAdminGetIntegrationByNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +347,8 @@ partial void ProcessAdminGetIntegrationByNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -356,6 +402,10 @@ partial void ProcessAdminGetIntegrationByNameResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -377,6 +427,10 @@ partial void ProcessAdminGetIntegrationByNameResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationLogs.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationLogs.g.cs index 9c85d83..fcb6fb4 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationLogs.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationLogs.g.cs @@ -83,6 +83,51 @@ partial void ProcessAdminGetIntegrationLogsResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetIntegrationLogsAsResponseAsync( + id: id, + timeStart: timeStart, + xWorkspaceId: xWorkspaceId, + timeEnd: timeEnd, + level: level, + userId: userId, + conversationId: conversationId, + messageContains: messageContains, + nextToken: nextToken, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get integration logs + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminGetIntegrationLogsAsResponseAsync( + string id, + string timeStart, + string xWorkspaceId, + string? timeEnd = default, + string? level = default, + string? userId = default, + string? conversationId = default, + string? messageContains = default, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -121,9 +166,10 @@ partial void ProcessAdminGetIntegrationLogsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/integrations/{id}/logs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("timeStart", timeStart) .AddOptionalParameter("timeEnd", timeEnd) @@ -131,7 +177,7 @@ partial void ProcessAdminGetIntegrationLogsResponse( .AddOptionalParameter("userId", userId) .AddOptionalParameter("conversationId", conversationId) .AddOptionalParameter("messageContains", messageContains) - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -219,6 +265,8 @@ partial void ProcessAdminGetIntegrationLogsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -229,6 +277,11 @@ partial void ProcessAdminGetIntegrationLogsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -246,6 +299,8 @@ partial void ProcessAdminGetIntegrationLogsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -255,8 +310,7 @@ partial void ProcessAdminGetIntegrationLogsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -265,6 +319,11 @@ partial void ProcessAdminGetIntegrationLogsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -281,14 +340,15 @@ partial void ProcessAdminGetIntegrationLogsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -328,6 +388,8 @@ partial void ProcessAdminGetIntegrationLogsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -348,6 +410,8 @@ partial void ProcessAdminGetIntegrationLogsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -401,6 +465,10 @@ partial void ProcessAdminGetIntegrationLogsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -422,6 +490,10 @@ partial void ProcessAdminGetIntegrationLogsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegration.g.cs index 4d7771e..ae60cbd 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegration.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminGetPublicIntegrationResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetPublicIntegrationAsResponseAsync( + name: name, + version: version, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get public integration by name and version + /// + /// + /// + /// + /// 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 AdminGetPublicIntegrationAsResponseAsync( + string name, + string version, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessAdminGetPublicIntegrationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/hub/integrations/{name}/{version}", baseUri: HttpClient.BaseAddress); @@ -167,6 +192,8 @@ partial void ProcessAdminGetPublicIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +204,11 @@ partial void ProcessAdminGetPublicIntegrationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +226,8 @@ partial void ProcessAdminGetPublicIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +237,7 @@ partial void ProcessAdminGetPublicIntegrationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +246,11 @@ partial void ProcessAdminGetPublicIntegrationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +267,15 @@ partial void ProcessAdminGetPublicIntegrationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +315,8 @@ partial void ProcessAdminGetPublicIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +337,8 @@ partial void ProcessAdminGetPublicIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -349,6 +392,10 @@ partial void ProcessAdminGetPublicIntegrationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -370,6 +417,10 @@ partial void ProcessAdminGetPublicIntegrationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegrationById.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegrationById.g.cs index 6a760f6..cd2bf39 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegrationById.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegrationById.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetPublicIntegrationByIdAsResponseAsync( + id: id, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get public integration by Id + /// + /// + /// + /// 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 AdminGetPublicIntegrationByIdAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/hub/integrations/{id}", baseUri: HttpClient.BaseAddress); @@ -161,6 +183,8 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +195,11 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +217,8 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +228,7 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +237,11 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +258,15 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +306,8 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +328,8 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -343,6 +383,10 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -364,6 +408,10 @@ partial void ProcessAdminGetPublicIntegrationByIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicWorkspace.g.cs index 073c292..f0659d0 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicWorkspace.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminGetPublicWorkspaceResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetPublicWorkspaceAsResponseAsync( + id: id, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get workspace public details + /// + /// + /// + /// 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 AdminGetPublicWorkspaceAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminGetPublicWorkspaceResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/workspaces/{id}/public", baseUri: HttpClient.BaseAddress); @@ -161,6 +183,8 @@ partial void ProcessAdminGetPublicWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +195,11 @@ partial void ProcessAdminGetPublicWorkspaceResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +217,8 @@ partial void ProcessAdminGetPublicWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +228,7 @@ partial void ProcessAdminGetPublicWorkspaceResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +237,11 @@ partial void ProcessAdminGetPublicWorkspaceResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +258,15 @@ partial void ProcessAdminGetPublicWorkspaceResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +306,8 @@ partial void ProcessAdminGetPublicWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +328,8 @@ partial void ProcessAdminGetPublicWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -343,6 +383,10 @@ partial void ProcessAdminGetPublicWorkspaceResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -364,6 +408,10 @@ partial void ProcessAdminGetPublicWorkspaceResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspace.g.cs index 2f485d1..8e4d4e2 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspace.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminGetWorkspaceResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetWorkspaceAsResponseAsync( + id: id, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get workspace details + /// + /// + /// + /// 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 AdminGetWorkspaceAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminGetWorkspaceResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/workspaces/{id}", baseUri: HttpClient.BaseAddress); @@ -161,6 +183,8 @@ partial void ProcessAdminGetWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +195,11 @@ partial void ProcessAdminGetWorkspaceResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +217,8 @@ partial void ProcessAdminGetWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +228,7 @@ partial void ProcessAdminGetWorkspaceResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +237,11 @@ partial void ProcessAdminGetWorkspaceResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +258,15 @@ partial void ProcessAdminGetWorkspaceResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +306,8 @@ partial void ProcessAdminGetWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +328,8 @@ partial void ProcessAdminGetWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -343,6 +383,10 @@ partial void ProcessAdminGetWorkspaceResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -364,6 +408,10 @@ partial void ProcessAdminGetWorkspaceResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspaceMember.g.cs index 9c6ab54..696c154 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspaceMember.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminGetWorkspaceMemberResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminGetWorkspaceMemberAsResponseAsync( + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get details of the account authenticating with this endpoint. + /// + /// + /// + /// 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 AdminGetWorkspaceMemberAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminGetWorkspaceMemberResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/workspace-members/me", baseUri: HttpClient.BaseAddress); @@ -162,6 +184,8 @@ partial void ProcessAdminGetWorkspaceMemberResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -172,6 +196,11 @@ partial void ProcessAdminGetWorkspaceMemberResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -189,6 +218,8 @@ partial void ProcessAdminGetWorkspaceMemberResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -198,8 +229,7 @@ partial void ProcessAdminGetWorkspaceMemberResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -208,6 +238,11 @@ partial void ProcessAdminGetWorkspaceMemberResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -224,14 +259,15 @@ partial void ProcessAdminGetWorkspaceMemberResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -271,6 +307,8 @@ partial void ProcessAdminGetWorkspaceMemberResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -291,6 +329,8 @@ partial void ProcessAdminGetWorkspaceMemberResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -344,6 +384,10 @@ partial void ProcessAdminGetWorkspaceMemberResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -365,6 +409,10 @@ partial void ProcessAdminGetWorkspaceMemberResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssueEvents.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssueEvents.g.cs index 2d8c6c8..66272ee 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssueEvents.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssueEvents.g.cs @@ -59,6 +59,33 @@ partial void ProcessAdminListBotIssueEventsResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminListBotIssueEventsAsResponseAsync( + id: id, + issueId: issueId, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List Events for a Bot Issue + /// + /// + /// + /// + /// + /// 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 AdminListBotIssueEventsAsResponseAsync( + string id, + string issueId, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessAdminListBotIssueEventsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/bots/{id}/issues/{issueId}/events", baseUri: HttpClient.BaseAddress); @@ -174,6 +202,8 @@ partial void ProcessAdminListBotIssueEventsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +214,11 @@ partial void ProcessAdminListBotIssueEventsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +236,8 @@ partial void ProcessAdminListBotIssueEventsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +247,7 @@ partial void ProcessAdminListBotIssueEventsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +256,11 @@ partial void ProcessAdminListBotIssueEventsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +277,15 @@ partial void ProcessAdminListBotIssueEventsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +325,8 @@ partial void ProcessAdminListBotIssueEventsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +347,8 @@ partial void ProcessAdminListBotIssueEventsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -356,6 +402,10 @@ partial void ProcessAdminListBotIssueEventsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -377,6 +427,10 @@ partial void ProcessAdminListBotIssueEventsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssues.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssues.g.cs index b8240c7..33a2f84 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssues.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssues.g.cs @@ -59,6 +59,33 @@ partial void ProcessAdminListBotIssuesResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminListBotIssuesAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + nextToken: nextToken, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List Bot Issues + /// + /// + /// + /// + /// + /// 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 AdminListBotIssuesAsResponseAsync( + string id, + string xWorkspaceId, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,11 +118,12 @@ partial void ProcessAdminListBotIssuesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/bots/{id}/issues", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -177,6 +205,8 @@ partial void ProcessAdminListBotIssuesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -187,6 +217,11 @@ partial void ProcessAdminListBotIssuesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -204,6 +239,8 @@ partial void ProcessAdminListBotIssuesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -213,8 +250,7 @@ partial void ProcessAdminListBotIssuesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -223,6 +259,11 @@ partial void ProcessAdminListBotIssuesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -239,14 +280,15 @@ partial void ProcessAdminListBotIssuesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -286,6 +328,8 @@ partial void ProcessAdminListBotIssuesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -306,6 +350,8 @@ partial void ProcessAdminListBotIssuesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -359,6 +405,10 @@ partial void ProcessAdminListBotIssuesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -380,6 +430,10 @@ partial void ProcessAdminListBotIssuesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBots.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBots.g.cs index 67f9dc8..a20f52a 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBots.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBots.g.cs @@ -71,6 +71,42 @@ partial void ProcessAdminListBotsResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminListBotsAsResponseAsync( + xWorkspaceId: xWorkspaceId, + dev: dev, + tags: tags, + nextToken: nextToken, + sortField: sortField, + sortDirection: sortDirection, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List bots + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminListBotsAsResponseAsync( + string xWorkspaceId, + bool? dev = default, + global::System.Collections.Generic.Dictionary? tags = default, + string? nextToken = default, + global::Botpress.AdminListBotsSortField? sortField = default, + global::Botpress.AdminListBotsSortDirection? sortDirection = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,15 +142,16 @@ partial void ProcessAdminListBotsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/bots", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("dev", dev?.ToString().ToLowerInvariant()) .AddOptionalParameter("tags", tags?.ToString()) .AddOptionalParameter("nextToken", nextToken) .AddOptionalParameter("sortField", sortField?.ToValueString()) - .AddOptionalParameter("sortDirection", sortDirection?.ToValueString()) + .AddOptionalParameter("sortDirection", sortDirection?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -199,6 +236,8 @@ partial void ProcessAdminListBotsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -209,6 +248,11 @@ partial void ProcessAdminListBotsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -226,6 +270,8 @@ partial void ProcessAdminListBotsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -235,8 +281,7 @@ partial void ProcessAdminListBotsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -245,6 +290,11 @@ partial void ProcessAdminListBotsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -261,14 +311,15 @@ partial void ProcessAdminListBotsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -308,6 +359,8 @@ partial void ProcessAdminListBotsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -328,6 +381,8 @@ partial void ProcessAdminListBotsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -381,6 +436,10 @@ partial void ProcessAdminListBotsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -402,6 +461,10 @@ partial void ProcessAdminListBotsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListIntegrations.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListIntegrations.g.cs index e432fc7..9612369 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListIntegrations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListIntegrations.g.cs @@ -103,6 +103,66 @@ partial void ProcessAdminListIntegrationsResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminListIntegrationsAsResponseAsync( + xWorkspaceId: xWorkspaceId, + nextToken: nextToken, + limit: limit, + name: name, + version: version, + interfaceId: interfaceId, + interfaceName: interfaceName, + installedByBotId: installedByBotId, + verificationStatus: verificationStatus, + search: search, + sortBy: sortBy, + direction: direction, + visibility: visibility, + dev: dev, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List integrations, supports filtering and sorting capabilities + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminListIntegrationsAsResponseAsync( + string xWorkspaceId, + string? nextToken = default, + double? limit = default, + string? name = default, + string? version = default, + string? interfaceId = default, + string? interfaceName = default, + string? installedByBotId = default, + global::Botpress.AdminListIntegrationsVerificationStatus? verificationStatus = default, + string? search = default, + global::Botpress.AdminListIntegrationsSortBy? sortBy = default, + global::Botpress.AdminListIntegrationsDirection? direction = default, + global::Botpress.AdminListIntegrationsVisibility? visibility = default, + bool? dev = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -146,9 +206,10 @@ partial void ProcessAdminListIntegrationsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/integrations", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) .AddOptionalParameter("limit", limit?.ToString()) @@ -162,7 +223,7 @@ partial void ProcessAdminListIntegrationsResponse( .AddOptionalParameter("sortBy", sortBy?.ToValueString()) .AddOptionalParameter("direction", direction?.ToValueString()) .AddOptionalParameter("visibility", visibility?.ToValueString()) - .AddOptionalParameter("dev", dev?.ToString().ToLowerInvariant()) + .AddOptionalParameter("dev", dev?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -255,6 +316,8 @@ partial void ProcessAdminListIntegrationsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -265,6 +328,11 @@ partial void ProcessAdminListIntegrationsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -282,6 +350,8 @@ partial void ProcessAdminListIntegrationsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -291,8 +361,7 @@ partial void ProcessAdminListIntegrationsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -301,6 +370,11 @@ partial void ProcessAdminListIntegrationsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -317,14 +391,15 @@ partial void ProcessAdminListIntegrationsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -364,6 +439,8 @@ partial void ProcessAdminListIntegrationsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -384,6 +461,8 @@ partial void ProcessAdminListIntegrationsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -437,6 +516,10 @@ partial void ProcessAdminListIntegrationsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -458,6 +541,10 @@ partial void ProcessAdminListIntegrationsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicIntegrations.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicIntegrations.g.cs index 60a5ef6..63b876b 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicIntegrations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicIntegrations.g.cs @@ -91,6 +91,57 @@ partial void ProcessAdminListPublicIntegrationsResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminListPublicIntegrationsAsResponseAsync( + nextToken: nextToken, + limit: limit, + name: name, + version: version, + interfaceId: interfaceId, + interfaceName: interfaceName, + installedByBotId: installedByBotId, + verificationStatus: verificationStatus, + search: search, + sortBy: sortBy, + direction: direction, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List public integration + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminListPublicIntegrationsAsResponseAsync( + string? nextToken = default, + double? limit = default, + string? name = default, + string? version = default, + string? interfaceId = default, + string? interfaceName = default, + string? installedByBotId = default, + global::Botpress.AdminListPublicIntegrationsVerificationStatus? verificationStatus = default, + string? search = default, + global::Botpress.AdminListPublicIntegrationsSortBy? sortBy = default, + global::Botpress.AdminListPublicIntegrationsDirection? direction = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -131,9 +182,10 @@ partial void ProcessAdminListPublicIntegrationsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/hub/integrations", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) .AddOptionalParameter("limit", limit?.ToString()) @@ -145,7 +197,7 @@ partial void ProcessAdminListPublicIntegrationsResponse( .AddOptionalParameter("verificationStatus", verificationStatus?.ToValueString()) .AddOptionalParameter("search", search) .AddOptionalParameter("sortBy", sortBy?.ToValueString()) - .AddOptionalParameter("direction", direction?.ToValueString()) + .AddOptionalParameter("direction", direction?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -234,6 +286,8 @@ partial void ProcessAdminListPublicIntegrationsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -244,6 +298,11 @@ partial void ProcessAdminListPublicIntegrationsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -261,6 +320,8 @@ partial void ProcessAdminListPublicIntegrationsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -270,8 +331,7 @@ partial void ProcessAdminListPublicIntegrationsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +340,11 @@ partial void ProcessAdminListPublicIntegrationsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -296,14 +361,15 @@ partial void ProcessAdminListPublicIntegrationsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -343,6 +409,8 @@ partial void ProcessAdminListPublicIntegrationsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -363,6 +431,8 @@ partial void ProcessAdminListPublicIntegrationsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -416,6 +486,10 @@ partial void ProcessAdminListPublicIntegrationsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -437,6 +511,10 @@ partial void ProcessAdminListPublicIntegrationsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicWorkspaces.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicWorkspaces.g.cs index 85eb456..6278d7c 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicWorkspaces.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicWorkspaces.g.cs @@ -59,6 +59,33 @@ partial void ProcessAdminListPublicWorkspacesResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminListPublicWorkspacesAsResponseAsync( + nextToken: nextToken, + workspaceIds: workspaceIds, + search: search, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List public workspaces + /// + /// + /// + /// + /// + /// 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 AdminListPublicWorkspacesAsResponseAsync( + string? nextToken = default, + global::System.Collections.Generic.IList? workspaceIds = default, + string? search = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,13 +118,14 @@ partial void ProcessAdminListPublicWorkspacesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/workspaces/public", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) .AddOptionalParameter("workspaceIds", workspaceIds, delimiter: ",", explode: true) - .AddOptionalParameter("search", search) + .AddOptionalParameter("search", search) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -178,6 +206,8 @@ partial void ProcessAdminListPublicWorkspacesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessAdminListPublicWorkspacesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessAdminListPublicWorkspacesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessAdminListPublicWorkspacesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessAdminListPublicWorkspacesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessAdminListPublicWorkspacesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessAdminListPublicWorkspacesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessAdminListPublicWorkspacesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessAdminListPublicWorkspacesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessAdminListPublicWorkspacesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaceMembers.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaceMembers.g.cs index 70f4444..529d98c 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaceMembers.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaceMembers.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminListWorkspaceMembersResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminListWorkspaceMembersAsResponseAsync( + xWorkspaceId: xWorkspaceId, + nextToken: nextToken, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Lists all the members in a workspace + /// + /// + /// + /// + /// 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 AdminListWorkspaceMembersAsResponseAsync( + string xWorkspaceId, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,11 +110,12 @@ partial void ProcessAdminListWorkspaceMembersResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/workspace-members", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -171,6 +196,8 @@ partial void ProcessAdminListWorkspaceMembersResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +208,11 @@ partial void ProcessAdminListWorkspaceMembersResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +230,8 @@ partial void ProcessAdminListWorkspaceMembersResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +241,7 @@ partial void ProcessAdminListWorkspaceMembersResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +250,11 @@ partial void ProcessAdminListWorkspaceMembersResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +271,15 @@ partial void ProcessAdminListWorkspaceMembersResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +319,8 @@ partial void ProcessAdminListWorkspaceMembersResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +341,8 @@ partial void ProcessAdminListWorkspaceMembersResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -353,6 +396,10 @@ partial void ProcessAdminListWorkspaceMembersResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -374,6 +421,10 @@ partial void ProcessAdminListWorkspaceMembersResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaces.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaces.g.cs index bb7e626..e1312af 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaces.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaces.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminListWorkspacesResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminListWorkspacesAsResponseAsync( + nextToken: nextToken, + handle: handle, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List workspaces the user has access to + /// + /// + /// + /// + /// 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 AdminListWorkspacesAsResponseAsync( + string? nextToken = default, + string? handle = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,12 +110,13 @@ partial void ProcessAdminListWorkspacesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/workspaces", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) - .AddOptionalParameter("handle", handle) + .AddOptionalParameter("handle", handle) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -171,6 +196,8 @@ partial void ProcessAdminListWorkspacesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +208,11 @@ partial void ProcessAdminListWorkspacesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +230,8 @@ partial void ProcessAdminListWorkspacesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +241,7 @@ partial void ProcessAdminListWorkspacesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +250,11 @@ partial void ProcessAdminListWorkspacesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +271,15 @@ partial void ProcessAdminListWorkspacesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +319,8 @@ partial void ProcessAdminListWorkspacesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +341,8 @@ partial void ProcessAdminListWorkspacesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -353,6 +396,10 @@ partial void ProcessAdminListWorkspacesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -374,6 +421,10 @@ partial void ProcessAdminListWorkspacesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateAccount.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateAccount.g.cs index 0c0b4be..35f35d3 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateAccount.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateAccount.g.cs @@ -47,6 +47,24 @@ partial void ProcessAdminUpdateAccountResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminUpdateAccountAsResponseAsync( + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update details of the account associated with authenticated user + /// + /// + /// 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 AdminUpdateAccountAsResponseAsync( + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessAdminUpdateAccountResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/account/me", baseUri: HttpClient.BaseAddress); @@ -155,6 +174,8 @@ partial void ProcessAdminUpdateAccountResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +186,11 @@ partial void ProcessAdminUpdateAccountResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +208,8 @@ partial void ProcessAdminUpdateAccountResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +219,7 @@ partial void ProcessAdminUpdateAccountResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +228,11 @@ partial void ProcessAdminUpdateAccountResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +249,15 @@ partial void ProcessAdminUpdateAccountResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +297,8 @@ partial void ProcessAdminUpdateAccountResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +319,8 @@ partial void ProcessAdminUpdateAccountResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -337,6 +374,10 @@ partial void ProcessAdminUpdateAccountResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -358,6 +399,10 @@ partial void ProcessAdminUpdateAccountResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateBot.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateBot.g.cs index 1561840..cc27f8e 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateBot.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminUpdateBotResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminUpdateBotAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update bot + /// + /// + /// + /// + /// 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 AdminUpdateBotAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessAdminUpdateBotResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/bots/{id}", baseUri: HttpClient.BaseAddress); @@ -168,6 +193,8 @@ partial void ProcessAdminUpdateBotResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +205,11 @@ partial void ProcessAdminUpdateBotResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +227,8 @@ partial void ProcessAdminUpdateBotResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +238,7 @@ partial void ProcessAdminUpdateBotResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +247,11 @@ partial void ProcessAdminUpdateBotResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +268,15 @@ partial void ProcessAdminUpdateBotResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +316,8 @@ partial void ProcessAdminUpdateBotResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +338,8 @@ partial void ProcessAdminUpdateBotResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -350,6 +393,10 @@ partial void ProcessAdminUpdateBotResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -371,6 +418,10 @@ partial void ProcessAdminUpdateBotResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateIntegration.g.cs index 7a93683..8687864 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateIntegration.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminUpdateIntegrationResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminUpdateIntegrationAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update integration + /// + /// + /// + /// + /// 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 AdminUpdateIntegrationAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessAdminUpdateIntegrationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/integrations/{id}", baseUri: HttpClient.BaseAddress); @@ -168,6 +193,8 @@ partial void ProcessAdminUpdateIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +205,11 @@ partial void ProcessAdminUpdateIntegrationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +227,8 @@ partial void ProcessAdminUpdateIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +238,7 @@ partial void ProcessAdminUpdateIntegrationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +247,11 @@ partial void ProcessAdminUpdateIntegrationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +268,15 @@ partial void ProcessAdminUpdateIntegrationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +316,8 @@ partial void ProcessAdminUpdateIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +338,8 @@ partial void ProcessAdminUpdateIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -350,6 +393,10 @@ partial void ProcessAdminUpdateIntegrationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -371,6 +418,10 @@ partial void ProcessAdminUpdateIntegrationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspace.g.cs index a4dbd49..355e583 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspace.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminUpdateWorkspaceResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminUpdateWorkspaceAsResponseAsync( + id: id, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update workspace + /// + /// + /// + /// 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 AdminUpdateWorkspaceAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminUpdateWorkspaceResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/workspaces/{id}", baseUri: HttpClient.BaseAddress); @@ -161,6 +183,8 @@ partial void ProcessAdminUpdateWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +195,11 @@ partial void ProcessAdminUpdateWorkspaceResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +217,8 @@ partial void ProcessAdminUpdateWorkspaceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +228,7 @@ partial void ProcessAdminUpdateWorkspaceResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +237,11 @@ partial void ProcessAdminUpdateWorkspaceResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +258,15 @@ partial void ProcessAdminUpdateWorkspaceResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +306,8 @@ partial void ProcessAdminUpdateWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +328,8 @@ partial void ProcessAdminUpdateWorkspaceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -343,6 +383,10 @@ partial void ProcessAdminUpdateWorkspaceResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -364,6 +408,10 @@ partial void ProcessAdminUpdateWorkspaceResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspaceMember.g.cs index c8fa2ef..4d24dd6 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspaceMember.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminUpdateWorkspaceMemberAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update the member of a workspace + /// + /// + /// + /// + /// 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 AdminUpdateWorkspaceMemberAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/workspace-members/{id}", baseUri: HttpClient.BaseAddress); @@ -168,6 +193,8 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +205,11 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +227,8 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +238,7 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +247,11 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +268,15 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +316,8 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +338,8 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -350,6 +393,10 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -371,6 +418,10 @@ partial void ProcessAdminUpdateWorkspaceMemberResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationCreation.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationCreation.g.cs index 3515239..04add42 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationCreation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationCreation.g.cs @@ -51,6 +51,27 @@ partial void ProcessAdminValidateIntegrationCreationResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminValidateIntegrationCreationAsResponseAsync( + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Perform a validation of an integration creation request + /// + /// + /// + /// 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 AdminValidateIntegrationCreationAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessAdminValidateIntegrationCreationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/admin/integrations/validate", baseUri: HttpClient.BaseAddress); @@ -162,6 +184,8 @@ partial void ProcessAdminValidateIntegrationCreationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -172,6 +196,11 @@ partial void ProcessAdminValidateIntegrationCreationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -189,6 +218,8 @@ partial void ProcessAdminValidateIntegrationCreationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -198,8 +229,7 @@ partial void ProcessAdminValidateIntegrationCreationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -208,6 +238,11 @@ partial void ProcessAdminValidateIntegrationCreationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -224,14 +259,15 @@ partial void ProcessAdminValidateIntegrationCreationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -271,6 +307,8 @@ partial void ProcessAdminValidateIntegrationCreationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -291,6 +329,8 @@ partial void ProcessAdminValidateIntegrationCreationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -344,6 +384,10 @@ partial void ProcessAdminValidateIntegrationCreationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -365,6 +409,10 @@ partial void ProcessAdminValidateIntegrationCreationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationUpdate.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationUpdate.g.cs index d388fff..55fef0c 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationUpdate.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationUpdate.g.cs @@ -55,6 +55,30 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await AdminValidateIntegrationUpdateAsResponseAsync( + id: id, + xWorkspaceId: xWorkspaceId, + xMultipleIntegrations: xMultipleIntegrations, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Perform a validation of an integration update request + /// + /// + /// + /// + /// 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 AdminValidateIntegrationUpdateAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/admin/integrations/{id}/validate", baseUri: HttpClient.BaseAddress); @@ -168,6 +193,8 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +205,11 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +227,8 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +238,7 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +247,11 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +268,15 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +316,8 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +338,8 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -350,6 +393,10 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -371,6 +418,10 @@ partial void ProcessAdminValidateIntegrationUpdateResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.g.cs index fe58cdd..26b9c8a 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.g.cs @@ -72,10 +72,10 @@ public AdminClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public AdminClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Botpress.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Botpress.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Botpress/Generated/Botpress.AutoSDKHttpResponse.g.cs b/src/libs/Botpress/Generated/Botpress.AutoSDKHttpResponse.g.cs new file mode 100644 index 0000000..6ff4cab --- /dev/null +++ b/src/libs/Botpress/Generated/Botpress.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace Botpress +{ + /// + /// Represents a successful HTTP response with status code and headers. + /// + public partial class AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri) + { + StatusCode = statusCode; + Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers)); + RequestUri = requestUri; + } + + /// + /// Gets the HTTP status code. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// Gets the response headers. + /// + public global::System.Collections.Generic.Dictionary> Headers { get; } + /// + /// Gets the final request URI associated with the response. + /// + public global::System.Uri? RequestUri { get; } + + internal static global::System.Collections.Generic.Dictionary> CreateHeaders( + global::System.Net.Http.HttpResponseMessage response) + { + response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + + var headers = global::System.Linq.Enumerable.ToDictionary( + response.Headers, + static header => header.Key, + static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value), + global::System.StringComparer.OrdinalIgnoreCase); + + if (response.Content?.Headers == null) + { + return headers; + } + + foreach (var header in response.Content.Headers) + { + if (headers.TryGetValue(header.Key, out var existingValues)) + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray( + global::System.Linq.Enumerable.Concat(existingValues, header.Value)); + } + else + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value); + } + } + + return headers; + } + } + + /// + /// Represents a successful HTTP response with status code, headers, and body. + /// + public partial class AutoSDKHttpResponse : AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + T body) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null, + body: body) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri, + T body) + : base(statusCode, headers, requestUri) + { + Body = body; + } + + /// + /// Gets the response body. + /// + public T Body { get; } + } +} \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.BotpressClient.g.cs b/src/libs/Botpress/Generated/Botpress.BotpressClient.g.cs index 21b28ae..70e6a10 100644 --- a/src/libs/Botpress/Generated/Botpress.BotpressClient.g.cs +++ b/src/libs/Botpress/Generated/Botpress.BotpressClient.g.cs @@ -43,7 +43,7 @@ public sealed partial class BotpressClient : global::Botpress.IBotpressClient, g /// /// /// - public AdminClient Admin => new AdminClient(HttpClient, authorizations: Authorizations, options: Options) + public AdminClient Admin => new AdminClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -52,7 +52,7 @@ public sealed partial class BotpressClient : global::Botpress.IBotpressClient, g /// /// /// - public ChatClient Chat => new ChatClient(HttpClient, authorizations: Authorizations, options: Options) + public ChatClient Chat => new ChatClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -61,7 +61,7 @@ public sealed partial class BotpressClient : global::Botpress.IBotpressClient, g /// /// /// - public FilesClient Files => new FilesClient(HttpClient, authorizations: Authorizations, options: Options) + public FilesClient Files => new FilesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -70,7 +70,7 @@ public sealed partial class BotpressClient : global::Botpress.IBotpressClient, g /// /// /// - public RuntimeClient Runtime => new RuntimeClient(HttpClient, authorizations: Authorizations, options: Options) + public RuntimeClient Runtime => new RuntimeClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -79,7 +79,7 @@ public sealed partial class BotpressClient : global::Botpress.IBotpressClient, g /// /// /// - public TablesClient Tables => new TablesClient(HttpClient, authorizations: Authorizations, options: Options) + public TablesClient Tables => new TablesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -118,10 +118,10 @@ public BotpressClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public BotpressClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Botpress.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Botpress.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatAddParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatAddParticipant.g.cs index b26f95a..1aa30e8 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatAddParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatAddParticipant.g.cs @@ -59,6 +59,35 @@ partial void ProcessChatAddParticipantResponseContent( string xUserKey, string conversationId, + global::Botpress.ChatAddParticipantRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatAddParticipantAsResponseAsync( + xUserKey: xUserKey, + conversationId: conversationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add Participant
+ /// Add a [Participant](#schema_user) to a [Conversation](#schema_conversation). + ///
+ /// + /// + /// + /// 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> ChatAddParticipantAsResponseAsync( + string xUserKey, + string conversationId, + global::Botpress.ChatAddParticipantRequest request, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessChatAddParticipantResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/conversations/{conversationId}/participants", baseUri: HttpClient.BaseAddress); @@ -179,6 +209,8 @@ partial void ProcessChatAddParticipantResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -189,6 +221,11 @@ partial void ProcessChatAddParticipantResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -206,6 +243,8 @@ partial void ProcessChatAddParticipantResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -215,8 +254,7 @@ partial void ProcessChatAddParticipantResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -225,6 +263,11 @@ partial void ProcessChatAddParticipantResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -241,14 +284,15 @@ partial void ProcessChatAddParticipantResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -288,6 +332,8 @@ partial void ProcessChatAddParticipantResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -308,6 +354,8 @@ partial void ProcessChatAddParticipantResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns the [Participant](#schema_user) object @@ -370,9 +418,13 @@ partial void ProcessChatAddParticipantResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatAddParticipantResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatAddParticipantResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -400,9 +452,13 @@ partial void ProcessChatAddParticipantResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatAddParticipantResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatAddParticipantResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateConversation.g.cs index 5b3ffaa..f8e836b 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateConversation.g.cs @@ -55,6 +55,32 @@ partial void ProcessChatCreateConversationResponseContent( public async global::System.Threading.Tasks.Task ChatCreateConversationAsync( string xUserKey, + global::Botpress.ChatCreateConversationRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatCreateConversationAsResponseAsync( + xUserKey: xUserKey, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Conversation
+ /// Creates a new [Conversation](#schema_conversation) + ///
+ /// + /// + /// 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> ChatCreateConversationAsResponseAsync( + string xUserKey, + global::Botpress.ChatCreateConversationRequest request, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessChatCreateConversationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/conversations", baseUri: HttpClient.BaseAddress); @@ -173,6 +200,8 @@ partial void ProcessChatCreateConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +212,11 @@ partial void ProcessChatCreateConversationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +234,8 @@ partial void ProcessChatCreateConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +245,7 @@ partial void ProcessChatCreateConversationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +254,11 @@ partial void ProcessChatCreateConversationResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +275,15 @@ partial void ProcessChatCreateConversationResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +323,8 @@ partial void ProcessChatCreateConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +345,8 @@ partial void ProcessChatCreateConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [Conversation](#schema_conversation) @@ -364,9 +409,13 @@ partial void ProcessChatCreateConversationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatCreateConversationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatCreateConversationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +443,13 @@ partial void ProcessChatCreateConversationResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatCreateConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatCreateConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateEvent.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateEvent.g.cs index 2652e93..e025e22 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateEvent.g.cs @@ -55,6 +55,32 @@ partial void ProcessChatCreateEventResponseContent( public async global::System.Threading.Tasks.Task ChatCreateEventAsync( string xUserKey, + global::Botpress.ChatCreateEventRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatCreateEventAsResponseAsync( + xUserKey: xUserKey, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Event
+ /// Creates a custom [Event](#schema_event) + ///
+ /// + /// + /// 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> ChatCreateEventAsResponseAsync( + string xUserKey, + global::Botpress.ChatCreateEventRequest request, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessChatCreateEventResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/events", baseUri: HttpClient.BaseAddress); @@ -173,6 +200,8 @@ partial void ProcessChatCreateEventResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +212,11 @@ partial void ProcessChatCreateEventResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +234,8 @@ partial void ProcessChatCreateEventResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +245,7 @@ partial void ProcessChatCreateEventResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +254,11 @@ partial void ProcessChatCreateEventResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +275,15 @@ partial void ProcessChatCreateEventResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +323,8 @@ partial void ProcessChatCreateEventResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +345,8 @@ partial void ProcessChatCreateEventResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [Event](#schema_event). @@ -364,9 +409,13 @@ partial void ProcessChatCreateEventResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatCreateEventResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatCreateEventResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +443,13 @@ partial void ProcessChatCreateEventResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatCreateEventResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatCreateEventResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateMessage.g.cs index ec29b54..c5cb7a9 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateMessage.g.cs @@ -55,6 +55,32 @@ partial void ProcessChatCreateMessageResponseContent( public async global::System.Threading.Tasks.Task ChatCreateMessageAsync( string xUserKey, + global::Botpress.ChatCreateMessageRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatCreateMessageAsResponseAsync( + xUserKey: xUserKey, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Message
+ /// Creates a new [Message](#schema_message) + ///
+ /// + /// + /// 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> ChatCreateMessageAsResponseAsync( + string xUserKey, + global::Botpress.ChatCreateMessageRequest request, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessChatCreateMessageResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/messages", baseUri: HttpClient.BaseAddress); @@ -173,6 +200,8 @@ partial void ProcessChatCreateMessageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +212,11 @@ partial void ProcessChatCreateMessageResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +234,8 @@ partial void ProcessChatCreateMessageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +245,7 @@ partial void ProcessChatCreateMessageResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +254,11 @@ partial void ProcessChatCreateMessageResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +275,15 @@ partial void ProcessChatCreateMessageResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +323,8 @@ partial void ProcessChatCreateMessageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +345,8 @@ partial void ProcessChatCreateMessageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [Message](#schema_message). @@ -364,9 +409,13 @@ partial void ProcessChatCreateMessageResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatCreateMessageResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatCreateMessageResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +443,13 @@ partial void ProcessChatCreateMessageResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatCreateMessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatCreateMessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateUser.g.cs index ab19a43..ba5793b 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateUser.g.cs @@ -51,6 +51,29 @@ partial void ProcessChatCreateUserResponseContent( /// public async global::System.Threading.Tasks.Task ChatCreateUserAsync( + global::Botpress.ChatCreateUserRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatCreateUserAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create User
+ /// Creates a new [User](#schema_user). This operation can only be called when using the shared encryption key. + ///
+ /// + /// 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> ChatCreateUserAsResponseAsync( + global::Botpress.ChatCreateUserRequest request, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessChatCreateUserResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/users", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessChatCreateUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessChatCreateUserResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessChatCreateUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessChatCreateUserResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessChatCreateUserResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessChatCreateUserResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessChatCreateUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessChatCreateUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [User](#schema_user) @@ -355,9 +397,13 @@ partial void ProcessChatCreateUserResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatCreateUserResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatCreateUserResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessChatCreateUserResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatCreateUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatCreateUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteConversation.g.cs index 21aad7f..7df14f9 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteConversation.g.cs @@ -57,6 +57,30 @@ partial void ProcessChatDeleteConversationResponseContent( string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatDeleteConversationAsResponseAsync( + xUserKey: xUserKey, + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Conversation
+ /// Permanently deletes a [Conversation](#schema_conversation). It cannot be undone. Also immediately deletes corresponding [Messages](#schema_message). + ///
+ /// + /// + /// 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> ChatDeleteConversationAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessChatDeleteConversationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/conversations/{id}", baseUri: HttpClient.BaseAddress); @@ -164,6 +189,8 @@ partial void ProcessChatDeleteConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +201,11 @@ partial void ProcessChatDeleteConversationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +223,8 @@ partial void ProcessChatDeleteConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +234,7 @@ partial void ProcessChatDeleteConversationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +243,11 @@ partial void ProcessChatDeleteConversationResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +264,15 @@ partial void ProcessChatDeleteConversationResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +312,8 @@ partial void ProcessChatDeleteConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +334,8 @@ partial void ProcessChatDeleteConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns the [Conversation](#schema_conversation) object that was deleted @@ -355,9 +398,13 @@ partial void ProcessChatDeleteConversationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatDeleteConversationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatDeleteConversationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +432,13 @@ partial void ProcessChatDeleteConversationResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatDeleteConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatDeleteConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteMessage.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteMessage.g.cs index 8ea3479..c94b272 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteMessage.g.cs @@ -57,6 +57,30 @@ partial void ProcessChatDeleteMessageResponseContent( string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatDeleteMessageAsResponseAsync( + xUserKey: xUserKey, + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Message
+ /// Permanently deletes a [Message](#schema_message). It cannot be undone. + ///
+ /// + /// + /// 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> ChatDeleteMessageAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessChatDeleteMessageResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/messages/{id}", baseUri: HttpClient.BaseAddress); @@ -164,6 +189,8 @@ partial void ProcessChatDeleteMessageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +201,11 @@ partial void ProcessChatDeleteMessageResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +223,8 @@ partial void ProcessChatDeleteMessageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +234,7 @@ partial void ProcessChatDeleteMessageResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +243,11 @@ partial void ProcessChatDeleteMessageResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +264,15 @@ partial void ProcessChatDeleteMessageResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +312,8 @@ partial void ProcessChatDeleteMessageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +334,8 @@ partial void ProcessChatDeleteMessageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns the [Message](#schema_message) object that was deleted @@ -355,9 +398,13 @@ partial void ProcessChatDeleteMessageResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatDeleteMessageResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatDeleteMessageResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +432,13 @@ partial void ProcessChatDeleteMessageResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatDeleteMessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatDeleteMessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteUser.g.cs index 51bf126..6713015 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteUser.g.cs @@ -53,6 +53,27 @@ partial void ProcessChatDeleteUserResponseContent( string xUserKey, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatDeleteUserAsResponseAsync( + xUserKey: xUserKey, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete User
+ /// Permanently deletes a [User](#schema_user). It cannot be undone. + ///
+ /// + /// 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> ChatDeleteUserAsResponseAsync( + string xUserKey, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessChatDeleteUserResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/users/me", baseUri: HttpClient.BaseAddress); @@ -158,6 +180,8 @@ partial void ProcessChatDeleteUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +192,11 @@ partial void ProcessChatDeleteUserResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +214,8 @@ partial void ProcessChatDeleteUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +225,7 @@ partial void ProcessChatDeleteUserResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +234,11 @@ partial void ProcessChatDeleteUserResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +255,15 @@ partial void ProcessChatDeleteUserResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +303,8 @@ partial void ProcessChatDeleteUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +325,8 @@ partial void ProcessChatDeleteUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns the [User](#schema_user) object that was deleted @@ -349,9 +389,13 @@ partial void ProcessChatDeleteUserResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatDeleteUserResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatDeleteUserResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -379,9 +423,13 @@ partial void ProcessChatDeleteUserResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatDeleteUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatDeleteUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetConversation.g.cs index b2711e6..1c93dae 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetConversation.g.cs @@ -57,6 +57,30 @@ partial void ProcessChatGetConversationResponseContent( string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatGetConversationAsResponseAsync( + xUserKey: xUserKey, + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Conversation
+ /// Retrieves the [Conversation](#schema_conversation) object for a valid identifier. + ///
+ /// + /// + /// 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> ChatGetConversationAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessChatGetConversationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/conversations/{id}", baseUri: HttpClient.BaseAddress); @@ -164,6 +189,8 @@ partial void ProcessChatGetConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +201,11 @@ partial void ProcessChatGetConversationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +223,8 @@ partial void ProcessChatGetConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +234,7 @@ partial void ProcessChatGetConversationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +243,11 @@ partial void ProcessChatGetConversationResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +264,15 @@ partial void ProcessChatGetConversationResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +312,8 @@ partial void ProcessChatGetConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +334,8 @@ partial void ProcessChatGetConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [Conversation](#schema_conversation) object if a valid identifier was provided @@ -355,9 +398,13 @@ partial void ProcessChatGetConversationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatGetConversationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatGetConversationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +432,13 @@ partial void ProcessChatGetConversationResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatGetConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatGetConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetEvent.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetEvent.g.cs index d7d67b5..915cc9b 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetEvent.g.cs @@ -57,6 +57,30 @@ partial void ProcessChatGetEventResponseContent( string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatGetEventAsResponseAsync( + xUserKey: xUserKey, + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Event
+ /// Retrieves the [Event](#schema_event) object for a valid identifier. + ///
+ /// + /// + /// 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> ChatGetEventAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessChatGetEventResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/events/{id}", baseUri: HttpClient.BaseAddress); @@ -164,6 +189,8 @@ partial void ProcessChatGetEventResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +201,11 @@ partial void ProcessChatGetEventResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +223,8 @@ partial void ProcessChatGetEventResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +234,7 @@ partial void ProcessChatGetEventResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +243,11 @@ partial void ProcessChatGetEventResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +264,15 @@ partial void ProcessChatGetEventResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +312,8 @@ partial void ProcessChatGetEventResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +334,8 @@ partial void ProcessChatGetEventResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns an [Event](#schema_event) object if a valid identifier was provided @@ -355,9 +398,13 @@ partial void ProcessChatGetEventResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatGetEventResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatGetEventResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +432,13 @@ partial void ProcessChatGetEventResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatGetEventResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatGetEventResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetMessage.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetMessage.g.cs index e70c7ed..939492c 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetMessage.g.cs @@ -57,6 +57,30 @@ partial void ProcessChatGetMessageResponseContent( string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatGetMessageAsResponseAsync( + xUserKey: xUserKey, + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Message
+ /// Retrieves the [Message](#schema_message) object for a valid identifier. + ///
+ /// + /// + /// 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> ChatGetMessageAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessChatGetMessageResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/messages/{id}", baseUri: HttpClient.BaseAddress); @@ -164,6 +189,8 @@ partial void ProcessChatGetMessageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +201,11 @@ partial void ProcessChatGetMessageResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +223,8 @@ partial void ProcessChatGetMessageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +234,7 @@ partial void ProcessChatGetMessageResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +243,11 @@ partial void ProcessChatGetMessageResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +264,15 @@ partial void ProcessChatGetMessageResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +312,8 @@ partial void ProcessChatGetMessageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +334,8 @@ partial void ProcessChatGetMessageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [Message](#schema_message) object if a valid identifier was provided @@ -355,9 +398,13 @@ partial void ProcessChatGetMessageResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatGetMessageResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatGetMessageResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +432,13 @@ partial void ProcessChatGetMessageResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatGetMessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatGetMessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateConversation.g.cs index 966976f..32ceb84 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateConversation.g.cs @@ -55,6 +55,32 @@ partial void ProcessChatGetOrCreateConversationResponseContent( public async global::System.Threading.Tasks.Task ChatGetOrCreateConversationAsync( string xUserKey, + global::Botpress.ChatGetOrCreateConversationRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatGetOrCreateConversationAsResponseAsync( + xUserKey: xUserKey, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Or Create Conversation
+ /// Get or create a new [Conversation](#schema_conversation) + ///
+ /// + /// + /// 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> ChatGetOrCreateConversationAsResponseAsync( + string xUserKey, + global::Botpress.ChatGetOrCreateConversationRequest request, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessChatGetOrCreateConversationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/conversations/get-or-create", baseUri: HttpClient.BaseAddress); @@ -173,6 +200,8 @@ partial void ProcessChatGetOrCreateConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +212,11 @@ partial void ProcessChatGetOrCreateConversationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +234,8 @@ partial void ProcessChatGetOrCreateConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +245,7 @@ partial void ProcessChatGetOrCreateConversationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +254,11 @@ partial void ProcessChatGetOrCreateConversationResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +275,15 @@ partial void ProcessChatGetOrCreateConversationResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +323,8 @@ partial void ProcessChatGetOrCreateConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +345,8 @@ partial void ProcessChatGetOrCreateConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [Conversation](#schema_conversation) @@ -364,9 +409,13 @@ partial void ProcessChatGetOrCreateConversationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatGetOrCreateConversationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatGetOrCreateConversationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +443,13 @@ partial void ProcessChatGetOrCreateConversationResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatGetOrCreateConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatGetOrCreateConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateUser.g.cs index 753abf1..39198cf 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateUser.g.cs @@ -55,6 +55,32 @@ partial void ProcessChatGetOrCreateUserResponseContent( public async global::System.Threading.Tasks.Task ChatGetOrCreateUserAsync( string xUserKey, + global::Botpress.ChatGetOrCreateUserRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatGetOrCreateUserAsResponseAsync( + xUserKey: xUserKey, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Or Create User
+ /// Get or create a new [User](#schema_user) + ///
+ /// + /// + /// 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> ChatGetOrCreateUserAsResponseAsync( + string xUserKey, + global::Botpress.ChatGetOrCreateUserRequest request, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessChatGetOrCreateUserResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/users/get-or-create", baseUri: HttpClient.BaseAddress); @@ -173,6 +200,8 @@ partial void ProcessChatGetOrCreateUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +212,11 @@ partial void ProcessChatGetOrCreateUserResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +234,8 @@ partial void ProcessChatGetOrCreateUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +245,7 @@ partial void ProcessChatGetOrCreateUserResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +254,11 @@ partial void ProcessChatGetOrCreateUserResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +275,15 @@ partial void ProcessChatGetOrCreateUserResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +323,8 @@ partial void ProcessChatGetOrCreateUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +345,8 @@ partial void ProcessChatGetOrCreateUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [User](#schema_user) @@ -364,9 +409,13 @@ partial void ProcessChatGetOrCreateUserResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatGetOrCreateUserResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatGetOrCreateUserResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +443,13 @@ partial void ProcessChatGetOrCreateUserResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatGetOrCreateUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatGetOrCreateUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetParticipant.g.cs index 9935920..2a54317 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetParticipant.g.cs @@ -61,6 +61,33 @@ partial void ProcessChatGetParticipantResponseContent( string userId, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatGetParticipantAsResponseAsync( + xUserKey: xUserKey, + conversationId: conversationId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Participant
+ /// Retrieves a [Participant](#schema_user) from a [Conversation](#schema_conversation). + ///
+ /// + /// + /// + /// 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> ChatGetParticipantAsResponseAsync( + string xUserKey, + string conversationId, + string userId, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,6 +119,7 @@ partial void ProcessChatGetParticipantResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/conversations/{conversationId}/participants/{userId}", baseUri: HttpClient.BaseAddress); @@ -170,6 +198,8 @@ partial void ProcessChatGetParticipantResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +210,11 @@ partial void ProcessChatGetParticipantResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +232,8 @@ partial void ProcessChatGetParticipantResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +243,7 @@ partial void ProcessChatGetParticipantResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +252,11 @@ partial void ProcessChatGetParticipantResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +273,15 @@ partial void ProcessChatGetParticipantResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +321,8 @@ partial void ProcessChatGetParticipantResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +343,8 @@ partial void ProcessChatGetParticipantResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns the [Participant](#schema_user) object @@ -361,9 +407,13 @@ partial void ProcessChatGetParticipantResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatGetParticipantResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatGetParticipantResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -391,9 +441,13 @@ partial void ProcessChatGetParticipantResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatGetParticipantResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatGetParticipantResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetUser.g.cs index bbec31d..2bfb407 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetUser.g.cs @@ -53,6 +53,27 @@ partial void ProcessChatGetUserResponseContent( string xUserKey, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatGetUserAsResponseAsync( + xUserKey: xUserKey, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get User
+ /// Retrieves the [User](#schema_user) object for a valid identifier. + ///
+ /// + /// 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> ChatGetUserAsResponseAsync( + string xUserKey, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessChatGetUserResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/users/me", baseUri: HttpClient.BaseAddress); @@ -158,6 +180,8 @@ partial void ProcessChatGetUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +192,11 @@ partial void ProcessChatGetUserResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +214,8 @@ partial void ProcessChatGetUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +225,7 @@ partial void ProcessChatGetUserResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +234,11 @@ partial void ProcessChatGetUserResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +255,15 @@ partial void ProcessChatGetUserResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +303,8 @@ partial void ProcessChatGetUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +325,8 @@ partial void ProcessChatGetUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [User](#schema_user) object if a valid identifier was provided @@ -349,9 +389,13 @@ partial void ProcessChatGetUserResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatGetUserResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatGetUserResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -379,9 +423,13 @@ partial void ProcessChatGetUserResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatGetUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatGetUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListConversations.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListConversations.g.cs index e7abe6f..d6bc142 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListConversations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListConversations.g.cs @@ -57,6 +57,30 @@ partial void ProcessChatListConversationsResponseContent( string? nextToken = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatListConversationsAsResponseAsync( + xUserKey: xUserKey, + nextToken: nextToken, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Conversations
+ /// Returns a list of [Conversation](#schema_conversation) objects + ///
+ /// + /// + /// 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> ChatListConversationsAsResponseAsync( + string xUserKey, + string? nextToken = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,11 +111,12 @@ partial void ProcessChatListConversationsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/conversations", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -167,6 +192,8 @@ partial void ProcessChatListConversationsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +204,11 @@ partial void ProcessChatListConversationsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +226,8 @@ partial void ProcessChatListConversationsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +237,7 @@ partial void ProcessChatListConversationsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +246,11 @@ partial void ProcessChatListConversationsResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +267,15 @@ partial void ProcessChatListConversationsResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +315,8 @@ partial void ProcessChatListConversationsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +337,8 @@ partial void ProcessChatListConversationsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a list of [Conversation](#schema_conversation) objects @@ -358,9 +401,13 @@ partial void ProcessChatListConversationsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatListConversationsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatListConversationsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -388,9 +435,13 @@ partial void ProcessChatListConversationsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatListConversationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatListConversationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListMessages.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListMessages.g.cs index 5a3d970..0e4b4e1 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListMessages.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListMessages.g.cs @@ -61,6 +61,33 @@ partial void ProcessChatListMessagesResponseContent( string? nextToken = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatListMessagesAsResponseAsync( + xUserKey: xUserKey, + conversationId: conversationId, + nextToken: nextToken, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Messages
+ /// Retrieves the conversation's [Messages](#schema_message) + ///
+ /// + /// + /// + /// 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> ChatListMessagesAsResponseAsync( + string xUserKey, + string conversationId, + string? nextToken = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,11 +119,12 @@ partial void ProcessChatListMessagesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/conversations/{conversationId}/messages", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -173,6 +201,8 @@ partial void ProcessChatListMessagesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +213,11 @@ partial void ProcessChatListMessagesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +235,8 @@ partial void ProcessChatListMessagesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +246,7 @@ partial void ProcessChatListMessagesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +255,11 @@ partial void ProcessChatListMessagesResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +276,15 @@ partial void ProcessChatListMessagesResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +324,8 @@ partial void ProcessChatListMessagesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +346,8 @@ partial void ProcessChatListMessagesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a list of [Message](#schema_message) objects @@ -364,9 +410,13 @@ partial void ProcessChatListMessagesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatListMessagesResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatListMessagesResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +444,13 @@ partial void ProcessChatListMessagesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatListMessagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatListMessagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListParticipants.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListParticipants.g.cs index be732a3..78c1194 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListParticipants.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListParticipants.g.cs @@ -61,6 +61,33 @@ partial void ProcessChatListParticipantsResponseContent( string? nextToken = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatListParticipantsAsResponseAsync( + xUserKey: xUserKey, + conversationId: conversationId, + nextToken: nextToken, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Participants
+ /// Retrieves a list of [Participants](#schema_user) for a given [Conversation](#schema_conversation). + ///
+ /// + /// + /// + /// 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> ChatListParticipantsAsResponseAsync( + string xUserKey, + string conversationId, + string? nextToken = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,11 +119,12 @@ partial void ProcessChatListParticipantsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/conversations/{conversationId}/participants", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -173,6 +201,8 @@ partial void ProcessChatListParticipantsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +213,11 @@ partial void ProcessChatListParticipantsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +235,8 @@ partial void ProcessChatListParticipantsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +246,7 @@ partial void ProcessChatListParticipantsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +255,11 @@ partial void ProcessChatListParticipantsResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +276,15 @@ partial void ProcessChatListParticipantsResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +324,8 @@ partial void ProcessChatListParticipantsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +346,8 @@ partial void ProcessChatListParticipantsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a list of [Participants](#schema_user) objects @@ -364,9 +410,13 @@ partial void ProcessChatListParticipantsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatListParticipantsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatListParticipantsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +444,13 @@ partial void ProcessChatListParticipantsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatListParticipantsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatListParticipantsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListenConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListenConversation.g.cs index 533ea8f..4a52ea8 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListenConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListenConversation.g.cs @@ -57,6 +57,30 @@ partial void ProcessChatListenConversationResponseContent( string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatListenConversationAsResponseAsync( + xUserKey: xUserKey, + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Listen Conversation
+ /// Creates a SSE stream to receive messages and events from a conversation + ///
+ /// + /// + /// 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> ChatListenConversationAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessChatListenConversationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/conversations/{id}/listen", baseUri: HttpClient.BaseAddress); @@ -164,6 +189,8 @@ partial void ProcessChatListenConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +201,11 @@ partial void ProcessChatListenConversationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +223,8 @@ partial void ProcessChatListenConversationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +234,7 @@ partial void ProcessChatListenConversationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +243,11 @@ partial void ProcessChatListenConversationResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +264,15 @@ partial void ProcessChatListenConversationResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +312,8 @@ partial void ProcessChatListenConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +334,8 @@ partial void ProcessChatListenConversationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns nothing but a stream @@ -355,9 +398,13 @@ partial void ProcessChatListenConversationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatListenConversationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatListenConversationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +432,13 @@ partial void ProcessChatListenConversationResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatListenConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatListenConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatRemoveParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatRemoveParticipant.g.cs index 2945111..eb738b4 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatRemoveParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatRemoveParticipant.g.cs @@ -61,6 +61,33 @@ partial void ProcessChatRemoveParticipantResponseContent( string userId, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatRemoveParticipantAsResponseAsync( + xUserKey: xUserKey, + conversationId: conversationId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Remove Participant
+ /// Remove a [Participant](#schema_user) from a [Conversation](#schema_conversation). + ///
+ /// + /// + /// + /// 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> ChatRemoveParticipantAsResponseAsync( + string xUserKey, + string conversationId, + string userId, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,6 +119,7 @@ partial void ProcessChatRemoveParticipantResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/chat-api/conversations/{conversationId}/participants/{userId}", baseUri: HttpClient.BaseAddress); @@ -170,6 +198,8 @@ partial void ProcessChatRemoveParticipantResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +210,11 @@ partial void ProcessChatRemoveParticipantResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +232,8 @@ partial void ProcessChatRemoveParticipantResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +243,7 @@ partial void ProcessChatRemoveParticipantResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +252,11 @@ partial void ProcessChatRemoveParticipantResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +273,15 @@ partial void ProcessChatRemoveParticipantResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +321,8 @@ partial void ProcessChatRemoveParticipantResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +343,8 @@ partial void ProcessChatRemoveParticipantResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns an empty object @@ -361,9 +407,13 @@ partial void ProcessChatRemoveParticipantResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatRemoveParticipantResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatRemoveParticipantResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -391,9 +441,13 @@ partial void ProcessChatRemoveParticipantResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatRemoveParticipantResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatRemoveParticipantResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatUpdateUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatUpdateUser.g.cs index 9fd4f6b..fbea2cb 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatUpdateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatUpdateUser.g.cs @@ -55,6 +55,32 @@ partial void ProcessChatUpdateUserResponseContent( public async global::System.Threading.Tasks.Task ChatUpdateUserAsync( string xUserKey, + global::Botpress.ChatUpdateUserRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ChatUpdateUserAsResponseAsync( + xUserKey: xUserKey, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update User
+ /// Update [User](#schema_user) + ///
+ /// + /// + /// 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> ChatUpdateUserAsResponseAsync( + string xUserKey, + global::Botpress.ChatUpdateUserRequest request, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessChatUpdateUserResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/chat-api/users/me", baseUri: HttpClient.BaseAddress); @@ -173,6 +200,8 @@ partial void ProcessChatUpdateUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +212,11 @@ partial void ProcessChatUpdateUserResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +234,8 @@ partial void ProcessChatUpdateUserResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +245,7 @@ partial void ProcessChatUpdateUserResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +254,11 @@ partial void ProcessChatUpdateUserResponseContent( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +275,15 @@ partial void ProcessChatUpdateUserResponseContent( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +323,8 @@ partial void ProcessChatUpdateUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +345,8 @@ partial void ProcessChatUpdateUserResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Returns a [User](#schema_user) @@ -364,9 +409,13 @@ partial void ProcessChatUpdateUserResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Botpress.ChatUpdateUserResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Botpress.ChatUpdateUserResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +443,13 @@ partial void ProcessChatUpdateUserResponseContent( #endif ).ConfigureAwait(false); - return - await global::Botpress.ChatUpdateUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Botpress.ChatUpdateUserResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.ChatClient.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.g.cs index 50cb3bc..1eefa0d 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.g.cs @@ -72,10 +72,10 @@ public ChatClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ChatClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Botpress.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Botpress.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesCopyFile.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesCopyFile.g.cs index f4cd1f0..f914315 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesCopyFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesCopyFile.g.cs @@ -79,6 +79,48 @@ partial void ProcessFilesCopyFileResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesCopyFileAsResponseAsync( + idOrKey: idOrKey, + destinationKey: destinationKey, + xBotId: xBotId, + xDestinationBotId: xDestinationBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Copy file + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesCopyFileAsResponseAsync( + string idOrKey, + string destinationKey, + string xBotId, + string? xDestinationBotId = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -116,6 +158,7 @@ partial void ProcessFilesCopyFileResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/files/{idOrKey}/{destinationKey}", baseUri: HttpClient.BaseAddress); @@ -224,6 +267,8 @@ partial void ProcessFilesCopyFileResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -234,6 +279,11 @@ partial void ProcessFilesCopyFileResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -251,6 +301,8 @@ partial void ProcessFilesCopyFileResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -260,8 +312,7 @@ partial void ProcessFilesCopyFileResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +321,11 @@ partial void ProcessFilesCopyFileResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -286,14 +342,15 @@ partial void ProcessFilesCopyFileResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -333,6 +390,8 @@ partial void ProcessFilesCopyFileResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -353,6 +412,8 @@ partial void ProcessFilesCopyFileResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -406,6 +467,10 @@ partial void ProcessFilesCopyFileResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -427,6 +492,10 @@ partial void ProcessFilesCopyFileResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesDeleteFile.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesDeleteFile.g.cs index 038d883..1935126 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesDeleteFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesDeleteFile.g.cs @@ -71,6 +71,42 @@ partial void ProcessFilesDeleteFileResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesDeleteFileAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Deletes a file. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesDeleteFileAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessFilesDeleteFileResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/files/{id}", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessFilesDeleteFileResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessFilesDeleteFileResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessFilesDeleteFileResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessFilesDeleteFileResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessFilesDeleteFileResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessFilesDeleteFileResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessFilesDeleteFileResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessFilesDeleteFileResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessFilesDeleteFileResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessFilesDeleteFileResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesGetFile.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesGetFile.g.cs index 104a752..8440280 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesGetFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesGetFile.g.cs @@ -71,6 +71,42 @@ partial void ProcessFilesGetFileResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesGetFileAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get file + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesGetFileAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessFilesGetFileResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/files/{id}", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessFilesGetFileResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessFilesGetFileResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessFilesGetFileResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessFilesGetFileResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessFilesGetFileResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessFilesGetFileResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessFilesGetFileResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessFilesGetFileResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessFilesGetFileResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessFilesGetFileResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFilePassages.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFilePassages.g.cs index bbedd72..a27a8ba 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFilePassages.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFilePassages.g.cs @@ -79,6 +79,48 @@ partial void ProcessFilesListFilePassagesResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesListFilePassagesAsResponseAsync( + id: id, + xBotId: xBotId, + nextToken: nextToken, + limit: limit, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List passages for a file + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesListFilePassagesAsResponseAsync( + string id, + string xBotId, + string? nextToken = default, + double? limit = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -116,12 +158,13 @@ partial void ProcessFilesListFilePassagesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/files/{id}/passages", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) - .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("limit", limit?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -224,6 +267,8 @@ partial void ProcessFilesListFilePassagesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -234,6 +279,11 @@ partial void ProcessFilesListFilePassagesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -251,6 +301,8 @@ partial void ProcessFilesListFilePassagesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -260,8 +312,7 @@ partial void ProcessFilesListFilePassagesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +321,11 @@ partial void ProcessFilesListFilePassagesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -286,14 +342,15 @@ partial void ProcessFilesListFilePassagesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -333,6 +390,8 @@ partial void ProcessFilesListFilePassagesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -353,6 +412,8 @@ partial void ProcessFilesListFilePassagesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -406,6 +467,10 @@ partial void ProcessFilesListFilePassagesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -427,6 +492,10 @@ partial void ProcessFilesListFilePassagesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTagValues.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTagValues.g.cs index d375df1..3ae808e 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTagValues.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTagValues.g.cs @@ -75,6 +75,45 @@ partial void ProcessFilesListFileTagValuesResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesListFileTagValuesAsResponseAsync( + tag: tag, + xBotId: xBotId, + nextToken: nextToken, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List available tags + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesListFileTagValuesAsResponseAsync( + string tag, + string xBotId, + string? nextToken = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -111,11 +150,12 @@ partial void ProcessFilesListFileTagValuesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/files/tags/{tag}/values", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -217,6 +257,8 @@ partial void ProcessFilesListFileTagValuesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -227,6 +269,11 @@ partial void ProcessFilesListFileTagValuesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -244,6 +291,8 @@ partial void ProcessFilesListFileTagValuesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -253,8 +302,7 @@ partial void ProcessFilesListFileTagValuesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +311,11 @@ partial void ProcessFilesListFileTagValuesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -279,14 +332,15 @@ partial void ProcessFilesListFileTagValuesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -326,6 +380,8 @@ partial void ProcessFilesListFileTagValuesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -346,6 +402,8 @@ partial void ProcessFilesListFileTagValuesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -399,6 +457,10 @@ partial void ProcessFilesListFileTagValuesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -420,6 +482,10 @@ partial void ProcessFilesListFileTagValuesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTags.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTags.g.cs index 06526d9..447b6fc 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTags.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTags.g.cs @@ -71,6 +71,42 @@ partial void ProcessFilesListFileTagsResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesListFileTagsAsResponseAsync( + xBotId: xBotId, + nextToken: nextToken, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List available tags + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesListFileTagsAsResponseAsync( + string xBotId, + string? nextToken = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,11 +142,12 @@ partial void ProcessFilesListFileTagsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/files/tags", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -211,6 +248,8 @@ partial void ProcessFilesListFileTagsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -221,6 +260,11 @@ partial void ProcessFilesListFileTagsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -238,6 +282,8 @@ partial void ProcessFilesListFileTagsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -247,8 +293,7 @@ partial void ProcessFilesListFileTagsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +302,11 @@ partial void ProcessFilesListFileTagsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -273,14 +323,15 @@ partial void ProcessFilesListFileTagsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -320,6 +371,8 @@ partial void ProcessFilesListFileTagsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -340,6 +393,8 @@ partial void ProcessFilesListFileTagsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -393,6 +448,10 @@ partial void ProcessFilesListFileTagsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -414,6 +473,10 @@ partial void ProcessFilesListFileTagsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFiles.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFiles.g.cs index 76dfea7..e3efe5f 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFiles.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFiles.g.cs @@ -91,6 +91,57 @@ partial void ProcessFilesListFilesResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesListFilesAsResponseAsync( + xBotId: xBotId, + nextToken: nextToken, + sortField: sortField, + sortDirection: sortDirection, + tags: tags, + ids: ids, + indexed: indexed, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// List files for bot + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesListFilesAsResponseAsync( + string xBotId, + string? nextToken = default, + global::Botpress.FilesListFilesSortField? sortField = default, + global::Botpress.FilesListFilesSortDirection? sortDirection = default, + object? tags = default, + global::System.Collections.Generic.IList? ids = default, + bool? indexed = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -131,16 +182,17 @@ partial void ProcessFilesListFilesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/files", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) .AddOptionalParameter("sortField", sortField?.ToValueString()) .AddOptionalParameter("sortDirection", sortDirection?.ToValueString()) .AddOptionalParameter("tags", tags?.ToString()) .AddOptionalParameter("ids", ids, delimiter: ",", explode: true) - .AddOptionalParameter("indexed", indexed?.ToString().ToLowerInvariant()) + .AddOptionalParameter("indexed", indexed?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -246,6 +298,8 @@ partial void ProcessFilesListFilesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -256,6 +310,11 @@ partial void ProcessFilesListFilesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -273,6 +332,8 @@ partial void ProcessFilesListFilesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -282,8 +343,7 @@ partial void ProcessFilesListFilesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -292,6 +352,11 @@ partial void ProcessFilesListFilesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -308,14 +373,15 @@ partial void ProcessFilesListFilesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -355,6 +421,8 @@ partial void ProcessFilesListFilesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -375,6 +443,8 @@ partial void ProcessFilesListFilesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -428,6 +498,10 @@ partial void ProcessFilesListFilesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -449,6 +523,10 @@ partial void ProcessFilesListFilesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesSearchFiles.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesSearchFiles.g.cs index fa5bad0..27ed6e6 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesSearchFiles.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesSearchFiles.g.cs @@ -95,6 +95,60 @@ partial void ProcessFilesSearchFilesResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesSearchFilesAsResponseAsync( + query: query, + xBotId: xBotId, + tags: tags, + contextDepth: contextDepth, + limit: limit, + consolidate: consolidate, + includeBreadcrumb: includeBreadcrumb, + withContext: withContext, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Search files + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesSearchFilesAsResponseAsync( + string query, + string xBotId, + object? tags = default, + int? contextDepth = default, + int? limit = default, + bool? consolidate = default, + bool? includeBreadcrumb = default, + bool? withContext = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -136,9 +190,10 @@ partial void ProcessFilesSearchFilesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/files/search", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("tags", tags?.ToString()) .AddRequiredParameter("query", query) @@ -146,7 +201,7 @@ partial void ProcessFilesSearchFilesResponse( .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("consolidate", consolidate?.ToString().ToLowerInvariant()) .AddOptionalParameter("includeBreadcrumb", includeBreadcrumb?.ToString().ToLowerInvariant()) - .AddOptionalParameter("withContext", withContext?.ToString().ToLowerInvariant()) + .AddOptionalParameter("withContext", withContext?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -253,6 +308,8 @@ partial void ProcessFilesSearchFilesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -263,6 +320,11 @@ partial void ProcessFilesSearchFilesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -280,6 +342,8 @@ partial void ProcessFilesSearchFilesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -289,8 +353,7 @@ partial void ProcessFilesSearchFilesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -299,6 +362,11 @@ partial void ProcessFilesSearchFilesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -315,14 +383,15 @@ partial void ProcessFilesSearchFilesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -362,6 +431,8 @@ partial void ProcessFilesSearchFilesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -382,6 +453,8 @@ partial void ProcessFilesSearchFilesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -435,6 +508,10 @@ partial void ProcessFilesSearchFilesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -456,6 +533,10 @@ partial void ProcessFilesSearchFilesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpdateFileMetadata.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpdateFileMetadata.g.cs index c6ff075..7549a8f 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpdateFileMetadata.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpdateFileMetadata.g.cs @@ -71,6 +71,42 @@ partial void ProcessFilesUpdateFileMetadataResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesUpdateFileMetadataAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update file metadata, without updating the file content. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesUpdateFileMetadataAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessFilesUpdateFileMetadataResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/files/{id}", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessFilesUpdateFileMetadataResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessFilesUpdateFileMetadataResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessFilesUpdateFileMetadataResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessFilesUpdateFileMetadataResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessFilesUpdateFileMetadataResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessFilesUpdateFileMetadataResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessFilesUpdateFileMetadataResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessFilesUpdateFileMetadataResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessFilesUpdateFileMetadataResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessFilesUpdateFileMetadataResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpsertFile.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpsertFile.g.cs index db1c709..09c0cfa 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpsertFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpsertFile.g.cs @@ -67,6 +67,39 @@ partial void ProcessFilesUpsertFileResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await FilesUpsertFileAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Creates or updates a file using the `key` parameter as unique identifier. Updating a file will erase the existing content of the file. Upload the file content by sending it in a PUT request to the `uploadUrl` returned in the response. + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesUpsertFileAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,6 +134,7 @@ partial void ProcessFilesUpsertFileResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/files", baseUri: HttpClient.BaseAddress); @@ -202,6 +236,8 @@ partial void ProcessFilesUpsertFileResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -212,6 +248,11 @@ partial void ProcessFilesUpsertFileResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -229,6 +270,8 @@ partial void ProcessFilesUpsertFileResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -238,8 +281,7 @@ partial void ProcessFilesUpsertFileResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -248,6 +290,11 @@ partial void ProcessFilesUpsertFileResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -264,14 +311,15 @@ partial void ProcessFilesUpsertFileResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -311,6 +359,8 @@ partial void ProcessFilesUpsertFileResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -331,6 +381,8 @@ partial void ProcessFilesUpsertFileResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -384,6 +436,10 @@ partial void ProcessFilesUpsertFileResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -405,6 +461,10 @@ partial void ProcessFilesUpsertFileResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.FilesClient.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.g.cs index 0a4b1f7..21b89c8 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.g.cs @@ -72,10 +72,10 @@ public FilesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public FilesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Botpress.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Botpress.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateBot.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateBot.g.cs index fac4380..c75d533 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateBot.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create bot + /// + /// + /// + /// 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 AdminCreateBotAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateIntegration.g.cs index ac778eb..64901bd 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateIntegration.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create integration + /// + /// + /// + /// 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 AdminCreateIntegrationAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateWorkspace.g.cs index 691ca84..8a4ca98 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateWorkspace.g.cs @@ -15,5 +15,16 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create workspace + /// + /// + /// 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 AdminCreateWorkspaceAsResponseAsync( + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateWorkspaceMember.g.cs index d67d623..53d1edd 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminCreateWorkspaceMember.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add a member to the workspace + /// + /// + /// + /// 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 AdminCreateWorkspaceMemberAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteBot.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteBot.g.cs index 6344769..c0b6bae 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteBot.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete bot + /// + /// + /// + /// + /// 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 AdminDeleteBotAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteBotIssue.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteBotIssue.g.cs index 0b191ee..e3d6d52 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteBotIssue.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteBotIssue.g.cs @@ -21,5 +21,22 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Bot Issue + /// + /// + /// + /// + /// + /// 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 AdminDeleteBotIssueAsResponseAsync( + string id, + string issueId, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteIntegration.g.cs index 0427dc8..f8ddab4 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteIntegration.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete integration + /// + /// + /// + /// + /// 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 AdminDeleteIntegrationAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteWorkspace.g.cs index d940220..720af62 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteWorkspace.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete workspace + /// + /// + /// + /// 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 AdminDeleteWorkspaceAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteWorkspaceMember.g.cs index f0cfc17..9cb9bda 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminDeleteWorkspaceMember.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove a member of a workspace + /// + /// + /// + /// + /// 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 AdminDeleteWorkspaceMemberAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetAccount.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetAccount.g.cs index a5e8bd8..c671094 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetAccount.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetAccount.g.cs @@ -15,5 +15,16 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get details of the account authenticating with this endpoint. + /// + /// + /// 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 AdminGetAccountAsResponseAsync( + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetAuditRecords.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetAuditRecords.g.cs index 5a6c6d8..a0314d3 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetAuditRecords.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetAuditRecords.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get the audit records of a workspace, sorted from most recent to oldest. + /// + /// + /// + /// + /// 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 AdminGetAuditRecordsAsResponseAsync( + string id, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBot.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBot.g.cs index 0a9c6ff..83bbab9 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBot.g.cs @@ -21,5 +21,22 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get bot details + /// + /// + /// + /// + /// + /// 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 AdminGetBotAsResponseAsync( + string id, + string xWorkspaceId, + bool? shouldMergePlugins = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotAnalytics.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotAnalytics.g.cs index d8cc258..2bf1516 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotAnalytics.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotAnalytics.g.cs @@ -23,5 +23,24 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get bot analytics + /// + /// + /// + /// + /// + /// + /// 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 AdminGetBotAnalyticsAsResponseAsync( + string id, + string startDate, + string endDate, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotIssue.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotIssue.g.cs index 2139324..35ceb55 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotIssue.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotIssue.g.cs @@ -21,5 +21,22 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Bot Issue + /// + /// + /// + /// + /// + /// 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 AdminGetBotIssueAsResponseAsync( + string id, + string issueId, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotLogs.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotLogs.g.cs index 9878883..d323163 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotLogs.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetBotLogs.g.cs @@ -35,5 +35,36 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get bot logs + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminGetBotLogsAsResponseAsync( + string id, + string timeStart, + string xWorkspaceId, + string? timeEnd = default, + string? level = default, + string? userId = default, + string? workflowId = default, + string? conversationId = default, + string? messageContains = default, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegration.g.cs index d362839..4789090 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegration.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get integration + /// + /// + /// + /// + /// 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 AdminGetIntegrationAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegrationByName.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegrationByName.g.cs index d06b995..b8f4064 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegrationByName.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegrationByName.g.cs @@ -21,5 +21,22 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get integration + /// + /// + /// + /// + /// + /// 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 AdminGetIntegrationByNameAsResponseAsync( + string name, + string version, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegrationLogs.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegrationLogs.g.cs index 2ea2480..cd5e13a 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegrationLogs.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetIntegrationLogs.g.cs @@ -33,5 +33,34 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get integration logs + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminGetIntegrationLogsAsResponseAsync( + string id, + string timeStart, + string xWorkspaceId, + string? timeEnd = default, + string? level = default, + string? userId = default, + string? conversationId = default, + string? messageContains = default, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicIntegration.g.cs index 8953ab4..971f9ef 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicIntegration.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get public integration by name and version + /// + /// + /// + /// + /// 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 AdminGetPublicIntegrationAsResponseAsync( + string name, + string version, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicIntegrationById.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicIntegrationById.g.cs index a5d4cc6..75f376c 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicIntegrationById.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicIntegrationById.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get public integration by Id + /// + /// + /// + /// 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 AdminGetPublicIntegrationByIdAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicWorkspace.g.cs index cb9d48c..fd94047 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetPublicWorkspace.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get workspace public details + /// + /// + /// + /// 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 AdminGetPublicWorkspaceAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetWorkspace.g.cs index 2712709..43f4869 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetWorkspace.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get workspace details + /// + /// + /// + /// 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 AdminGetWorkspaceAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetWorkspaceMember.g.cs index 6dde868..2f8514d 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminGetWorkspaceMember.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get details of the account authenticating with this endpoint. + /// + /// + /// + /// 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 AdminGetWorkspaceMemberAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBotIssueEvents.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBotIssueEvents.g.cs index 5a4aa20..5f5b2f2 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBotIssueEvents.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBotIssueEvents.g.cs @@ -21,5 +21,22 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Events for a Bot Issue + /// + /// + /// + /// + /// + /// 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 AdminListBotIssueEventsAsResponseAsync( + string id, + string issueId, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBotIssues.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBotIssues.g.cs index 8ef9c7e..a59ba27 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBotIssues.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBotIssues.g.cs @@ -21,5 +21,22 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Bot Issues + /// + /// + /// + /// + /// + /// 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 AdminListBotIssuesAsResponseAsync( + string id, + string xWorkspaceId, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBots.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBots.g.cs index ee4823e..83aecc9 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBots.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListBots.g.cs @@ -27,5 +27,28 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List bots + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminListBotsAsResponseAsync( + string xWorkspaceId, + bool? dev = default, + global::System.Collections.Generic.Dictionary? tags = default, + string? nextToken = default, + global::Botpress.AdminListBotsSortField? sortField = default, + global::Botpress.AdminListBotsSortDirection? sortDirection = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListIntegrations.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListIntegrations.g.cs index 0d145dd..81f1f56 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListIntegrations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListIntegrations.g.cs @@ -43,5 +43,44 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List integrations, supports filtering and sorting capabilities + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminListIntegrationsAsResponseAsync( + string xWorkspaceId, + string? nextToken = default, + double? limit = default, + string? name = default, + string? version = default, + string? interfaceId = default, + string? interfaceName = default, + string? installedByBotId = default, + global::Botpress.AdminListIntegrationsVerificationStatus? verificationStatus = default, + string? search = default, + global::Botpress.AdminListIntegrationsSortBy? sortBy = default, + global::Botpress.AdminListIntegrationsDirection? direction = default, + global::Botpress.AdminListIntegrationsVisibility? visibility = default, + bool? dev = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListPublicIntegrations.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListPublicIntegrations.g.cs index 2b1fd8d..229b44d 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListPublicIntegrations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListPublicIntegrations.g.cs @@ -37,5 +37,38 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List public integration + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 AdminListPublicIntegrationsAsResponseAsync( + string? nextToken = default, + double? limit = default, + string? name = default, + string? version = default, + string? interfaceId = default, + string? interfaceName = default, + string? installedByBotId = default, + global::Botpress.AdminListPublicIntegrationsVerificationStatus? verificationStatus = default, + string? search = default, + global::Botpress.AdminListPublicIntegrationsSortBy? sortBy = default, + global::Botpress.AdminListPublicIntegrationsDirection? direction = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListPublicWorkspaces.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListPublicWorkspaces.g.cs index aa4551f..f353ca0 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListPublicWorkspaces.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListPublicWorkspaces.g.cs @@ -21,5 +21,22 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List public workspaces + /// + /// + /// + /// + /// + /// 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 AdminListPublicWorkspacesAsResponseAsync( + string? nextToken = default, + global::System.Collections.Generic.IList? workspaceIds = default, + string? search = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListWorkspaceMembers.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListWorkspaceMembers.g.cs index 15ae407..03cd399 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListWorkspaceMembers.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListWorkspaceMembers.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Lists all the members in a workspace + /// + /// + /// + /// + /// 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 AdminListWorkspaceMembersAsResponseAsync( + string xWorkspaceId, + string? nextToken = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListWorkspaces.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListWorkspaces.g.cs index 2678581..bfa81ca 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListWorkspaces.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminListWorkspaces.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List workspaces the user has access to + /// + /// + /// + /// + /// 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 AdminListWorkspacesAsResponseAsync( + string? nextToken = default, + string? handle = default, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateAccount.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateAccount.g.cs index 9cbc6ec..6ff047e 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateAccount.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateAccount.g.cs @@ -15,5 +15,16 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update details of the account associated with authenticated user + /// + /// + /// 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 AdminUpdateAccountAsResponseAsync( + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateBot.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateBot.g.cs index 1ce4c59..a9cb043 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateBot.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update bot + /// + /// + /// + /// + /// 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 AdminUpdateBotAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateIntegration.g.cs index 2891746..a4025ab 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateIntegration.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update integration + /// + /// + /// + /// + /// 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 AdminUpdateIntegrationAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateWorkspace.g.cs index b9be2c3..8e1206c 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateWorkspace.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update workspace + /// + /// + /// + /// 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 AdminUpdateWorkspaceAsResponseAsync( + string id, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateWorkspaceMember.g.cs index 5a26223..c6e22c1 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminUpdateWorkspaceMember.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update the member of a workspace + /// + /// + /// + /// + /// 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 AdminUpdateWorkspaceMemberAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminValidateIntegrationCreation.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminValidateIntegrationCreation.g.cs index e49fd67..47faab6 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminValidateIntegrationCreation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminValidateIntegrationCreation.g.cs @@ -17,5 +17,18 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Perform a validation of an integration creation request + /// + /// + /// + /// 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 AdminValidateIntegrationCreationAsResponseAsync( + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminValidateIntegrationUpdate.g.cs b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminValidateIntegrationUpdate.g.cs index 304c6e1..618b0b3 100644 --- a/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminValidateIntegrationUpdate.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IAdminClient.AdminValidateIntegrationUpdate.g.cs @@ -19,5 +19,20 @@ public partial interface IAdminClient string? xMultipleIntegrations = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Perform a validation of an integration update request + /// + /// + /// + /// + /// 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 AdminValidateIntegrationUpdateAsResponseAsync( + string id, + string xWorkspaceId, + string? xMultipleIntegrations = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatAddParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatAddParticipant.g.cs index 2299742..58842fb 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatAddParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatAddParticipant.g.cs @@ -27,6 +27,23 @@ public partial interface IChatClient /// /// /// + /// + /// 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> ChatAddParticipantAsResponseAsync( + string xUserKey, + string conversationId, + + global::Botpress.ChatAddParticipantRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Participant
+ /// Add a [Participant](#schema_user) to a [Conversation](#schema_conversation). + ///
+ /// + /// /// /// User id /// diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateConversation.g.cs index 2bba4c4..4f4ffdd 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateConversation.g.cs @@ -24,6 +24,21 @@ public partial interface IChatClient /// Creates a new [Conversation](#schema_conversation) /// /// + /// + /// 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> ChatCreateConversationAsResponseAsync( + string xUserKey, + + global::Botpress.ChatCreateConversationRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Conversation
+ /// Creates a new [Conversation](#schema_conversation) + ///
+ /// /// /// Identifier of the [Conversation](#schema_conversation) /// diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateEvent.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateEvent.g.cs index d073bb8..0363afc 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateEvent.g.cs @@ -24,6 +24,21 @@ public partial interface IChatClient /// Creates a custom [Event](#schema_event) /// /// + /// + /// 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> ChatCreateEventAsResponseAsync( + string xUserKey, + + global::Botpress.ChatCreateEventRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Event
+ /// Creates a custom [Event](#schema_event) + ///
+ /// /// /// Payload is the content of the custom event. /// diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateMessage.g.cs index 52d8227..d21709b 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateMessage.g.cs @@ -24,6 +24,21 @@ public partial interface IChatClient /// Creates a new [Message](#schema_message) /// /// + /// + /// 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> ChatCreateMessageAsResponseAsync( + string xUserKey, + + global::Botpress.ChatCreateMessageRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Message
+ /// Creates a new [Message](#schema_message) + ///
+ /// /// /// Payload is the content type of the message. /// diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateUser.g.cs index 98c7766..cae5b63 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatCreateUser.g.cs @@ -21,6 +21,19 @@ public partial interface IChatClient /// Create User
/// Creates a new [User](#schema_user). This operation can only be called when using the shared encryption key. /// + /// + /// 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> ChatCreateUserAsResponseAsync( + + global::Botpress.ChatCreateUserRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create User
+ /// Creates a new [User](#schema_user). This operation can only be called when using the shared encryption key. + ///
/// /// Name of the [User](#schema_user) (not a unique identifier) /// diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteConversation.g.cs index d65ac07..49ddf42 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteConversation.g.cs @@ -18,5 +18,19 @@ public partial interface IChatClient string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Conversation
+ /// Permanently deletes a [Conversation](#schema_conversation). It cannot be undone. Also immediately deletes corresponding [Messages](#schema_message). + ///
+ /// + /// + /// 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> ChatDeleteConversationAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteMessage.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteMessage.g.cs index d0844b1..170bc8d 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteMessage.g.cs @@ -18,5 +18,19 @@ public partial interface IChatClient string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Message
+ /// Permanently deletes a [Message](#schema_message). It cannot be undone. + ///
+ /// + /// + /// 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> ChatDeleteMessageAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteUser.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteUser.g.cs index 58ef70a..1013e5f 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatDeleteUser.g.cs @@ -16,5 +16,17 @@ public partial interface IChatClient string xUserKey, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete User
+ /// Permanently deletes a [User](#schema_user). It cannot be undone. + ///
+ /// + /// 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> ChatDeleteUserAsResponseAsync( + string xUserKey, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetConversation.g.cs index 3f62fdc..92462c0 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetConversation.g.cs @@ -18,5 +18,19 @@ public partial interface IChatClient string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Conversation
+ /// Retrieves the [Conversation](#schema_conversation) object for a valid identifier. + ///
+ /// + /// + /// 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> ChatGetConversationAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetEvent.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetEvent.g.cs index d691d7d..125435b 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetEvent.g.cs @@ -18,5 +18,19 @@ public partial interface IChatClient string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Event
+ /// Retrieves the [Event](#schema_event) object for a valid identifier. + ///
+ /// + /// + /// 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> ChatGetEventAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetMessage.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetMessage.g.cs index 873f6da..4db5c07 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetMessage.g.cs @@ -18,5 +18,19 @@ public partial interface IChatClient string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Message
+ /// Retrieves the [Message](#schema_message) object for a valid identifier. + ///
+ /// + /// + /// 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> ChatGetMessageAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetOrCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetOrCreateConversation.g.cs index 13ea54a..a0f9fa8 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetOrCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetOrCreateConversation.g.cs @@ -24,6 +24,21 @@ public partial interface IChatClient /// Get or create a new [Conversation](#schema_conversation) /// /// + /// + /// 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> ChatGetOrCreateConversationAsResponseAsync( + string xUserKey, + + global::Botpress.ChatGetOrCreateConversationRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Or Create Conversation
+ /// Get or create a new [Conversation](#schema_conversation) + ///
+ /// /// /// Identifier of the [Conversation](#schema_conversation) /// diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetOrCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetOrCreateUser.g.cs index 2c41655..6d0e8e9 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetOrCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetOrCreateUser.g.cs @@ -24,6 +24,21 @@ public partial interface IChatClient /// Get or create a new [User](#schema_user) /// /// + /// + /// 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> ChatGetOrCreateUserAsResponseAsync( + string xUserKey, + + global::Botpress.ChatGetOrCreateUserRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Or Create User
+ /// Get or create a new [User](#schema_user) + ///
+ /// /// /// Name of the [User](#schema_user) (not a unique identifier) /// diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetParticipant.g.cs index 441c3f5..c7c78fc 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetParticipant.g.cs @@ -20,5 +20,21 @@ public partial interface IChatClient string userId, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Participant
+ /// Retrieves a [Participant](#schema_user) from a [Conversation](#schema_conversation). + ///
+ /// + /// + /// + /// 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> ChatGetParticipantAsResponseAsync( + string xUserKey, + string conversationId, + string userId, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetUser.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetUser.g.cs index c047d41..82ab2f9 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatGetUser.g.cs @@ -16,5 +16,17 @@ public partial interface IChatClient string xUserKey, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get User
+ /// Retrieves the [User](#schema_user) object for a valid identifier. + ///
+ /// + /// 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> ChatGetUserAsResponseAsync( + string xUserKey, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListConversations.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListConversations.g.cs index 557afb9..8eb012c 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListConversations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListConversations.g.cs @@ -18,5 +18,19 @@ public partial interface IChatClient string? nextToken = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Conversations
+ /// Returns a list of [Conversation](#schema_conversation) objects + ///
+ /// + /// + /// 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> ChatListConversationsAsResponseAsync( + string xUserKey, + string? nextToken = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListMessages.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListMessages.g.cs index df9b40c..5db9a65 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListMessages.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListMessages.g.cs @@ -20,5 +20,21 @@ public partial interface IChatClient string? nextToken = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Messages
+ /// Retrieves the conversation's [Messages](#schema_message) + ///
+ /// + /// + /// + /// 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> ChatListMessagesAsResponseAsync( + string xUserKey, + string conversationId, + string? nextToken = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListParticipants.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListParticipants.g.cs index 1fe0a4a..ea35206 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListParticipants.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListParticipants.g.cs @@ -20,5 +20,21 @@ public partial interface IChatClient string? nextToken = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Participants
+ /// Retrieves a list of [Participants](#schema_user) for a given [Conversation](#schema_conversation). + ///
+ /// + /// + /// + /// 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> ChatListParticipantsAsResponseAsync( + string xUserKey, + string conversationId, + string? nextToken = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListenConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListenConversation.g.cs index 7dfbdc3..8b77167 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListenConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatListenConversation.g.cs @@ -18,5 +18,19 @@ public partial interface IChatClient string id, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Listen Conversation
+ /// Creates a SSE stream to receive messages and events from a conversation + ///
+ /// + /// + /// 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> ChatListenConversationAsResponseAsync( + string xUserKey, + string id, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatRemoveParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatRemoveParticipant.g.cs index 95e4e5a..bb51581 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatRemoveParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatRemoveParticipant.g.cs @@ -20,5 +20,21 @@ public partial interface IChatClient string userId, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove Participant
+ /// Remove a [Participant](#schema_user) from a [Conversation](#schema_conversation). + ///
+ /// + /// + /// + /// 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> ChatRemoveParticipantAsResponseAsync( + string xUserKey, + string conversationId, + string userId, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatUpdateUser.g.cs b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatUpdateUser.g.cs index eb2a655..e4d4731 100644 --- a/src/libs/Botpress/Generated/Botpress.IChatClient.ChatUpdateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IChatClient.ChatUpdateUser.g.cs @@ -24,6 +24,21 @@ public partial interface IChatClient /// Update [User](#schema_user) /// /// + /// + /// 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> ChatUpdateUserAsResponseAsync( + string xUserKey, + + global::Botpress.ChatUpdateUserRequest request, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update User
+ /// Update [User](#schema_user) + ///
+ /// /// /// Name of the [User](#schema_user) (not a unique identifier) /// diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesCopyFile.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesCopyFile.g.cs index cf0150b..dc1dd33 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesCopyFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesCopyFile.g.cs @@ -31,5 +31,32 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Copy file + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesCopyFileAsResponseAsync( + string idOrKey, + string destinationKey, + string xBotId, + string? xDestinationBotId = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesDeleteFile.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesDeleteFile.g.cs index 9467d8d..0072cd0 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesDeleteFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesDeleteFile.g.cs @@ -27,5 +27,28 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Deletes a file. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesDeleteFileAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesGetFile.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesGetFile.g.cs index a72a360..f1227ed 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesGetFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesGetFile.g.cs @@ -27,5 +27,28 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get file + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesGetFileAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFilePassages.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFilePassages.g.cs index 5d919e6..45e7094 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFilePassages.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFilePassages.g.cs @@ -31,5 +31,32 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List passages for a file + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesListFilePassagesAsResponseAsync( + string id, + string xBotId, + string? nextToken = default, + double? limit = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFileTagValues.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFileTagValues.g.cs index a863031..10d0256 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFileTagValues.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFileTagValues.g.cs @@ -29,5 +29,30 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List available tags + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesListFileTagValuesAsResponseAsync( + string tag, + string xBotId, + string? nextToken = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFileTags.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFileTags.g.cs index 5c26fc3..0611be5 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFileTags.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFileTags.g.cs @@ -27,5 +27,28 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List available tags + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesListFileTagsAsResponseAsync( + string xBotId, + string? nextToken = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFiles.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFiles.g.cs index 3a0903f..04cf380 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFiles.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesListFiles.g.cs @@ -37,5 +37,38 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List files for bot + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesListFilesAsResponseAsync( + string xBotId, + string? nextToken = default, + global::Botpress.FilesListFilesSortField? sortField = default, + global::Botpress.FilesListFilesSortDirection? sortDirection = default, + object? tags = default, + global::System.Collections.Generic.IList? ids = default, + bool? indexed = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesSearchFiles.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesSearchFiles.g.cs index 60da189..4adda44 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesSearchFiles.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesSearchFiles.g.cs @@ -39,5 +39,40 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Search files + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesSearchFilesAsResponseAsync( + string query, + string xBotId, + object? tags = default, + int? contextDepth = default, + int? limit = default, + bool? consolidate = default, + bool? includeBreadcrumb = default, + bool? withContext = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesUpdateFileMetadata.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesUpdateFileMetadata.g.cs index 1cf6536..4def6da 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesUpdateFileMetadata.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesUpdateFileMetadata.g.cs @@ -27,5 +27,28 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update file metadata, without updating the file content. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesUpdateFileMetadataAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesUpsertFile.g.cs b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesUpsertFile.g.cs index a9a055c..cd75a8f 100644 --- a/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesUpsertFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IFilesClient.FilesUpsertFile.g.cs @@ -25,5 +25,26 @@ public partial interface IFilesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates or updates a file using the `key` parameter as unique identifier. Updating a file will erase the existing content of the file. Upload the file content by sending it in a PUT request to the `uploadUrl` returned in the response. + /// + /// + /// + /// + /// + /// + /// + /// 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 FilesUpsertFileAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeAddParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeAddParticipant.g.cs index b343521..c140b59 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeAddParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeAddParticipant.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add a [Participant](#schema_participant) to a [Conversation](#schema_conversation). + /// + /// + /// + /// + /// + /// 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 RuntimeAddParticipantAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCallAction.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCallAction.g.cs index 06b3e65..f5852fa 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCallAction.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCallAction.g.cs @@ -19,5 +19,20 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call an action + /// + /// + /// + /// + /// 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 RuntimeCallActionAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCancelScheduledEvent.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCancelScheduledEvent.g.cs index b2e868c..009bd94 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCancelScheduledEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCancelScheduledEvent.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Permanently cancels a scheduled [Event](#schema_event). The event must be in a `scheduled` state. + /// + /// + /// + /// + /// + /// 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 RuntimeCancelScheduledEventAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeConfigureIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeConfigureIntegration.g.cs index a6cd3d0..bfa1f18 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeConfigureIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeConfigureIntegration.g.cs @@ -19,5 +19,20 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// An integration can call this endpoint to configure itself + /// + /// + /// + /// + /// 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 RuntimeConfigureIntegrationAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateConversation.g.cs index 28b9e38..e890225 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateConversation.g.cs @@ -19,5 +19,20 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates a new [Conversation](#schema_conversation). When creating a new [Conversation](#schema_conversation), the required tags must be provided. See the specific integration for more details. + /// + /// + /// + /// + /// 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 RuntimeCreateConversationAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateEvent.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateEvent.g.cs index 2711502..d91d3f5 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateEvent.g.cs @@ -19,5 +19,20 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates a new [Event](#schema_event). When creating a new [Event](#schema_event), the required tags must be provided. See the specific integration for more details. + /// + /// + /// + /// + /// 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 RuntimeCreateEventAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateMessage.g.cs index 4a7f6ab..00bef0d 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateMessage.g.cs @@ -19,5 +19,20 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates a new [Message](#schema_message). When creating a new [Message](#schema_message), the required tags must be provided. See the specific integration for more details. + /// + /// + /// + /// + /// 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 RuntimeCreateMessageAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateUser.g.cs index 6c2cecf..7e781a8 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeCreateUser.g.cs @@ -19,5 +19,20 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates a new [User](#schema_user). When creating a new [User](#schema_user), the required tags must be provided. See the specific integration for more details. + /// + /// + /// + /// + /// 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 RuntimeCreateUserAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteConversation.g.cs index ad98566..46ba9a9 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteConversation.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Permanently deletes a [Conversation](#schema_conversation). It cannot be undone. Also immediately deletes corresponding [Messages](#schema_message). + /// + /// + /// + /// + /// + /// 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 RuntimeDeleteConversationAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteMessage.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteMessage.g.cs index 825c68b..a63d67f 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteMessage.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Permanently deletes a [Message](#schema_message). It cannot be undone. + /// + /// + /// + /// + /// + /// 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 RuntimeDeleteMessageAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteUser.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteUser.g.cs index e1f9d2a..aaf7d09 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeDeleteUser.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Permanently deletes a [User](#schema_user). It cannot be undone. + /// + /// + /// + /// + /// + /// 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 RuntimeDeleteUserAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetConversation.g.cs index 609696f..ec41621 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetConversation.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves the [Conversation](#schema_conversation) object for a valid identifier. + /// + /// + /// + /// + /// + /// 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 RuntimeGetConversationAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetEvent.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetEvent.g.cs index 528cb1c..fb39e00 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetEvent.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves the [Event](#schema_event) object for a valid identifiers. + /// + /// + /// + /// + /// + /// 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 RuntimeGetEventAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetMessage.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetMessage.g.cs index 82638f8..7ef3e18 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetMessage.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves the [Message](#schema_message) object for a valid identifier. + /// + /// + /// + /// + /// + /// 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 RuntimeGetMessageAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateConversation.g.cs index f556d90..2e20b01 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateConversation.g.cs @@ -19,5 +19,20 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves the [Conversation](#schema_conversation) object containing given tags. If the conversation does not exist, it will be created. Tags will be updated if they are set in the request body. + /// + /// + /// + /// + /// 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 RuntimeGetOrCreateConversationAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateMessage.g.cs index 762cedb..99a2dc3 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateMessage.g.cs @@ -19,5 +19,20 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves the [Message](#schema_message) object for given discriminating tags. If the message does not exist, it will be created. If the message already exists, its tags and payload will be updated with the provided values if they are defined. + /// + /// + /// + /// + /// 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 RuntimeGetOrCreateMessageAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateUser.g.cs index 3bd8bb7..9d9597f 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrCreateUser.g.cs @@ -19,5 +19,20 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves the [User](#schema_user) object for given discriminating tags. If the user does not exist, it will be created. If the user already exists, its name, pictureUrl, attributes, and tags will be updated with the provided values. + /// + /// + /// + /// + /// 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 RuntimeGetOrCreateUserAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrSetState.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrSetState.g.cs index 69e6513..0611c62 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrSetState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetOrSetState.g.cs @@ -25,5 +25,26 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves the [State](#schema_state) object for a valid identifiers. If the state does not exist, it creates a new state. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeGetOrSetStateAsResponseAsync( + global::Botpress.RuntimeGetOrSetStateType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetParticipant.g.cs index f539a92..2be890a 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetParticipant.g.cs @@ -23,5 +23,24 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves a [Participant](#schema_participant) from a [Conversation](#schema_conversation). + /// + /// + /// + /// + /// + /// + /// 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 RuntimeGetParticipantAsResponseAsync( + string id, + string userId, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetState.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetState.g.cs index 7a272c4..d689687 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetState.g.cs @@ -25,5 +25,26 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves the [State](#schema_state) object for a valid identifiers. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeGetStateAsResponseAsync( + global::Botpress.RuntimeGetStateType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetUser.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetUser.g.cs index b2aa317..b4a1e4c 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeGetUser.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves the [User](#schema_user) object for a valid identifier. + /// + /// + /// + /// + /// + /// 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 RuntimeGetUserAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListConversations.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListConversations.g.cs index 0a7c0d7..3161b24 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListConversations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListConversations.g.cs @@ -37,5 +37,38 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves a list of [Conversation](#schema_conversation) you’ve previously created. The conversations are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](#tags). + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListConversationsAsResponseAsync( + string xBotId, + string? nextToken = default, + global::Botpress.RuntimeListConversationsSortField? sortField = default, + global::Botpress.RuntimeListConversationsSortDirection? sortDirection = default, + global::System.Collections.Generic.Dictionary? tags = default, + global::System.Collections.Generic.IList? participantIds = default, + string? integrationName = default, + string? channel = default, + string? afterDate = default, + string? beforeDate = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListEvents.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListEvents.g.cs index 93d1c43..bb9834a 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListEvents.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListEvents.g.cs @@ -33,5 +33,34 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves a list of [Event](#schema_event) you’ve previously created. The events are returned in sorted order, with the most recent appearing first. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListEventsAsResponseAsync( + string xBotId, + string? nextToken = default, + string? type = default, + string? conversationId = default, + string? userId = default, + string? messageId = default, + string? workflowId = default, + global::Botpress.RuntimeListEventsStatus? status = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListMessages.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListMessages.g.cs index 71a7dbe..3784507 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListMessages.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListMessages.g.cs @@ -29,5 +29,30 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves a list of [Message](#schema_message) you’ve previously created. The messages are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](/docs/developers/concepts/tags). + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListMessagesAsResponseAsync( + string xBotId, + string? nextToken = default, + string? conversationId = default, + global::System.Collections.Generic.Dictionary? tags = default, + string? afterDate = default, + string? beforeDate = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListParticipants.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListParticipants.g.cs index f5138a9..71b86af 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListParticipants.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListParticipants.g.cs @@ -23,5 +23,24 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves a list of [Participant](#schema_participant) for a given [Conversation](#schema_conversation). + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListParticipantsAsResponseAsync( + string id, + string xBotId, + string? nextToken = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListTagValues.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListTagValues.g.cs index 71e0015..33b4dc6 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListTagValues.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListTagValues.g.cs @@ -25,5 +25,26 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get a bot tag values + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListTagValuesAsResponseAsync( + string key, + global::Botpress.RuntimeListTagValuesType type, + string xBotId, + string? nextToken = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListUsers.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListUsers.g.cs index 957079b..ade5761 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListUsers.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeListUsers.g.cs @@ -35,5 +35,36 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves a list of [User](#schema_user) previously created. The users are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](/docs/developers/concepts/tags). + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListUsersAsResponseAsync( + string xBotId, + string? nextToken = default, + string? conversationId = default, + global::System.Collections.Generic.Dictionary? tags = default, + string? afterDate = default, + string? beforeDate = default, + global::Botpress.RuntimeListUsersRangeField? rangeField = default, + global::Botpress.RuntimeListUsersSortField? sortField = default, + global::Botpress.RuntimeListUsersSortDirection? sortDirection = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimePatchState.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimePatchState.g.cs index 5c77371..e0f8e94 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimePatchState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimePatchState.g.cs @@ -25,5 +25,26 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Updates the [State](#schema_state) object by setting the values of the parameters passed. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimePatchStateAsResponseAsync( + global::Botpress.RuntimePatchStateType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeRemoveParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeRemoveParticipant.g.cs index 3da6b4b..3d0eb23 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeRemoveParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeRemoveParticipant.g.cs @@ -23,5 +23,24 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove a [Participant](#schema_participant) from a [Conversation](#schema_conversation). + /// + /// + /// + /// + /// + /// + /// 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 RuntimeRemoveParticipantAsResponseAsync( + string id, + string userId, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeSetState.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeSetState.g.cs index a148a1e..d298f07 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeSetState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeSetState.g.cs @@ -25,5 +25,26 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Overrides the [State](#schema_state) object by setting the values of the parameters passed. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeSetStateAsResponseAsync( + global::Botpress.RuntimeSetStateType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeSetStateExpiry.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeSetStateExpiry.g.cs index de9f0e5..14cbcab 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeSetStateExpiry.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeSetStateExpiry.g.cs @@ -25,5 +25,26 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Updates the [State](#schema_state) expiry. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeSetStateExpiryAsResponseAsync( + global::Botpress.RuntimeSetStateExpiryType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateConversation.g.cs index 8f58070..9d84dd0 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateConversation.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update a [Conversation](#schema_conversation) object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + /// + /// + /// + /// + /// + /// 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 RuntimeUpdateConversationAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateMessage.g.cs index 5c2024c..1d75c65 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateMessage.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Updates a message tags and payload. The message type cannot be changed. Calling this operation from an integration, to update an incoming message, will not invoke the bot. The other way around it also true; Calling this operation from the bot, to update an outgoing message, will not invoke the integration. + /// + /// + /// + /// + /// + /// 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 RuntimeUpdateMessageAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateUser.g.cs b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateUser.g.cs index a286d70..c373be1 100644 --- a/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.IRuntimeClient.RuntimeUpdateUser.g.cs @@ -21,5 +21,22 @@ public partial interface IRuntimeClient string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update a [User](#schema_user) object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + /// + /// + /// + /// + /// + /// 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 RuntimeUpdateUserAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesCreateTable.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesCreateTable.g.cs index 5cd6f42..55e5e50 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesCreateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesCreateTable.g.cs @@ -25,5 +25,26 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Initiates the creation of a new table based on the provided schema, excluding system-managed fields like IDs and timestamps. + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesCreateTableAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesCreateTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesCreateTableRows.g.cs index f2a37ab..f3b2465 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesCreateTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesCreateTableRows.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Inserts one or multiple new rows into the specified table. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesCreateTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDeleteTable.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDeleteTable.g.cs index a7ff974..ce1bbc4 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDeleteTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDeleteTable.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Permanently deletes a table and all its associated data from the system. Use with caution, as this action cannot be undone. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesDeleteTableAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDeleteTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDeleteTableRows.g.cs index f801fe7..80321f3 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDeleteTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDeleteTableRows.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Allows selective deletion of rows or complete clearance of a table. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesDeleteTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDuplicateTable.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDuplicateTable.g.cs index d0ff872..70b1873 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDuplicateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesDuplicateTable.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Duplicates the table schema & content + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesDuplicateTableAsResponseAsync( + string sourceTableId, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesFindTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesFindTableRows.g.cs index af07474..bbb4b73 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesFindTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesFindTableRows.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Enables the search and filtering of rows within a table based on specific criteria. This operation supports complex queries for advanced data manipulation and retrieval. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesFindTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetOrCreateTable.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetOrCreateTable.g.cs index 8d4fcb7..d039163 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetOrCreateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetOrCreateTable.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves information about a specific table if it exists; otherwise, creates a new table based on the provided schema. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesGetOrCreateTableAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetTable.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetTable.g.cs index 1019695..0e079e0 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetTable.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves detailed information about a specific table, identified by its name or unique identifier. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesGetTableAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetTableRow.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetTableRow.g.cs index f534ad3..e3dab73 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetTableRow.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesGetTableRow.g.cs @@ -29,5 +29,30 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Fetches a specific row from a table using the row's unique identifier. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesGetTableRowAsResponseAsync( + string table, + int id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesListTables.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesListTables.g.cs index fdd6df4..9ff30da 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesListTables.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesListTables.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retrieves a list of all tables associated with your bot. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesListTablesAsResponseAsync( + string xBotId, + global::System.Collections.Generic.Dictionary? tags = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesRenameTableColumn.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesRenameTableColumn.g.cs index e396259..6f2246c 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesRenameTableColumn.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesRenameTableColumn.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Renames an existing column within a table to better reflect its content or usage. The operation targets a specific table and requires the current and new column names. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesRenameTableColumnAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpdateTable.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpdateTable.g.cs index 1237dd6..8a0aeb6 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpdateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpdateTable.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Updates the schema or the name of an existing table. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesUpdateTableAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpdateTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpdateTableRows.g.cs index 9419b09..88f4338 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpdateTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpdateTableRows.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Updates specified rows in a table, allowing partial success with detailed feedback on errors. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesUpdateTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpsertTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpsertTableRows.g.cs index c5b7639..9abfe3f 100644 --- a/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpsertTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ITablesClient.TablesUpsertTableRows.g.cs @@ -27,5 +27,28 @@ public partial interface ITablesClient string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Inserts or updates rows based on a key. If a row exists, it is updated; otherwise, a new row is created. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesUpsertTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Botpress/Generated/Botpress.OptionsSupport.g.cs b/src/libs/Botpress/Generated/Botpress.OptionsSupport.g.cs index 5f4fc55..7fdc057 100644 --- a/src/libs/Botpress/Generated/Botpress.OptionsSupport.g.cs +++ b/src/libs/Botpress/Generated/Botpress.OptionsSupport.g.cs @@ -101,9 +101,45 @@ public sealed class AutoSDKRetryOptions public int MaxAttempts { get; set; } = 1; /// - /// Optional fixed delay between retry attempts. + /// Optional fixed delay between retry attempts. When set, this takes precedence over exponential backoff. /// public global::System.TimeSpan? Delay { get; set; } + + /// + /// Initial exponential backoff delay used when is not set. + /// + public global::System.TimeSpan InitialDelay { get; set; } = global::System.TimeSpan.FromSeconds(1); + + /// + /// Maximum retry delay after applying retry headers, backoff, and jitter. + /// + public global::System.TimeSpan MaxDelay { get; set; } = global::System.TimeSpan.FromSeconds(30); + + /// + /// Multiplier applied to exponential backoff after each failed attempt. + /// Values below 1 are normalized to 1. + /// + public double BackoffMultiplier { get; set; } = 2D; + + /// + /// Randomizes computed backoff by plus or minus this ratio. Values are clamped to 0..1. + /// + public double JitterRatio { get; set; } = 0.2D; + + /// + /// Whether Retry-After response headers should control retry delay when present. + /// + public bool UseRetryAfterHeader { get; set; } = true; + + /// + /// Whether a rate-limit reset response header should control retry delay when present. + /// + public bool UseRateLimitResetHeader { get; set; } + + /// + /// Optional provider-specific rate-limit reset header name. Values may be Unix seconds or an HTTP date. + /// + public string? RateLimitResetHeaderName { get; set; } = "X-RateLimit-Reset"; } @@ -231,6 +267,16 @@ public sealed class AutoSDKHookContext /// public bool WillRetry { get; set; } + /// + /// The computed retry delay when is true. + /// + public global::System.TimeSpan? RetryDelay { get; set; } + + /// + /// A short retry reason such as exception or status:429. + /// + public string RetryReason { get; set; } = string.Empty; + /// /// The effective cancellation token for the current request attempt. /// @@ -254,6 +300,8 @@ internal static class AutoSDKRequestOptionsSupport int attempt, int maxAttempts, bool willRetry, + global::System.TimeSpan? retryDelay, + string retryReason, global::System.Threading.CancellationToken cancellationToken) { return new global::Botpress.AutoSDKHookContext @@ -271,6 +319,8 @@ internal static class AutoSDKRequestOptionsSupport Attempt = attempt, MaxAttempts = maxAttempts, WillRetry = willRetry, + RetryDelay = retryDelay, + RetryReason = retryReason ?? string.Empty, CancellationToken = cancellationToken, }; } @@ -338,19 +388,188 @@ internal static int GetMaxAttempts( return maxAttempts < 1 ? 1 : maxAttempts; } - internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + internal static global::System.TimeSpan GetRetryDelay( global::Botpress.AutoSDKClientOptions clientOptions, global::Botpress.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::Botpress.AutoSDKRetryOptions(); + + if (retryOptions.UseRetryAfterHeader && + TryGetRetryAfterDelay(response, out var retryAfterDelay)) + { + return ClampRetryDelay(retryAfterDelay, retryOptions); + } + + if (retryOptions.UseRateLimitResetHeader && + TryGetRateLimitResetDelay(response, retryOptions.RateLimitResetHeaderName, out var rateLimitResetDelay)) + { + return ClampRetryDelay(rateLimitResetDelay, retryOptions); + } + + if (retryOptions.Delay.HasValue) + { + return ClampRetryDelay(retryOptions.Delay.Value, retryOptions); + } + + var initialDelay = retryOptions.InitialDelay; + if (initialDelay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var multiplier = retryOptions.BackoffMultiplier < 1D ? 1D : retryOptions.BackoffMultiplier; + var exponent = attempt <= 1 ? 0 : attempt - 1; + var delayMilliseconds = initialDelay.TotalMilliseconds * global::System.Math.Pow(multiplier, exponent); + if (double.IsNaN(delayMilliseconds) || double.IsInfinity(delayMilliseconds) || delayMilliseconds < 0D) + { + delayMilliseconds = 0D; + } + + var delay = global::System.TimeSpan.FromMilliseconds(delayMilliseconds); + delay = ApplyJitter(delay, retryOptions.JitterRatio); + return ClampRetryDelay(delay, retryOptions); + } + + internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + global::System.TimeSpan retryDelay, global::System.Threading.CancellationToken cancellationToken) { - var delay = requestOptions?.Retry?.Delay ?? - clientOptions.Retry?.Delay; - if (!delay.HasValue || delay.Value <= global::System.TimeSpan.Zero) + if (retryDelay <= global::System.TimeSpan.Zero) { return; } - await global::System.Threading.Tasks.Task.Delay(delay.Value, cancellationToken).ConfigureAwait(false); + await global::System.Threading.Tasks.Task.Delay(retryDelay, cancellationToken).ConfigureAwait(false); + } + + private static bool TryGetRetryAfterDelay( + global::System.Net.Http.HttpResponseMessage? response, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + var retryAfter = response?.Headers.RetryAfter; + if (retryAfter == null) + { + return false; + } + + if (retryAfter.Delta.HasValue) + { + delay = retryAfter.Delta.Value; + return delay > global::System.TimeSpan.Zero; + } + + if (retryAfter.Date.HasValue) + { + delay = retryAfter.Date.Value - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static bool TryGetRateLimitResetDelay( + global::System.Net.Http.HttpResponseMessage? response, + string? headerName, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + if (response == null || string.IsNullOrWhiteSpace(headerName)) + { + return false; + } + + if (!response.Headers.TryGetValues(headerName, out var values) && + (response.Content?.Headers == null || !response.Content.Headers.TryGetValues(headerName, out values))) + { + return false; + } + + var value = global::System.Linq.Enumerable.FirstOrDefault(values); + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + value = value.Trim(); + if (long.TryParse( + value, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var unixSeconds)) + { + delay = global::System.DateTimeOffset.FromUnixTimeSeconds(unixSeconds) - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + if (global::System.DateTimeOffset.TryParse( + value, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var resetAt)) + { + delay = resetAt - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static global::System.TimeSpan ApplyJitter( + global::System.TimeSpan delay, + double jitterRatio) + { + if (delay <= global::System.TimeSpan.Zero || jitterRatio <= 0D) + { + return delay; + } + + if (jitterRatio > 1D) + { + jitterRatio = 1D; + } + + var sample = NextJitterSample(); + var multiplier = 1D - jitterRatio + (sample * jitterRatio * 2D); + var milliseconds = delay.TotalMilliseconds * multiplier; + if (double.IsNaN(milliseconds) || double.IsInfinity(milliseconds) || milliseconds < 0D) + { + milliseconds = 0D; + } + + return global::System.TimeSpan.FromMilliseconds(milliseconds); + } + + private static double NextJitterSample() + { + var bytes = new byte[8]; + using (var randomNumberGenerator = global::System.Security.Cryptography.RandomNumberGenerator.Create()) + { + randomNumberGenerator.GetBytes(bytes); + } + + var value = global::System.BitConverter.ToUInt64(bytes, 0); + return value / (double)ulong.MaxValue; + } + + private static global::System.TimeSpan ClampRetryDelay( + global::System.TimeSpan delay, + global::Botpress.AutoSDKRetryOptions retryOptions) + { + if (delay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var maxDelay = retryOptions.MaxDelay; + if (maxDelay > global::System.TimeSpan.Zero && delay > maxDelay) + { + return maxDelay; + } + + return delay; } internal static bool ShouldRetryStatusCode( diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeAddParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeAddParticipant.g.cs index 89ad0d9..a30d9a9 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeAddParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeAddParticipant.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeAddParticipantResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeAddParticipantAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add a [Participant](#schema_participant) to a [Conversation](#schema_conversation). + /// + /// + /// + /// + /// + /// 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 RuntimeAddParticipantAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeAddParticipantResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/conversations/{id}/participants", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeAddParticipantResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeAddParticipantResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeAddParticipantResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeAddParticipantResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeAddParticipantResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeAddParticipantResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeAddParticipantResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeAddParticipantResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeAddParticipantResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeAddParticipantResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCallAction.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCallAction.g.cs index 739abb6..6934e61 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCallAction.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCallAction.g.cs @@ -55,6 +55,30 @@ partial void ProcessRuntimeCallActionResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeCallActionAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Call an action + /// + /// + /// + /// + /// 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 RuntimeCallActionAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessRuntimeCallActionResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/actions", baseUri: HttpClient.BaseAddress); @@ -172,6 +197,8 @@ partial void ProcessRuntimeCallActionResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +209,11 @@ partial void ProcessRuntimeCallActionResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +231,8 @@ partial void ProcessRuntimeCallActionResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +242,7 @@ partial void ProcessRuntimeCallActionResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +251,11 @@ partial void ProcessRuntimeCallActionResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +272,15 @@ partial void ProcessRuntimeCallActionResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +320,8 @@ partial void ProcessRuntimeCallActionResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +342,8 @@ partial void ProcessRuntimeCallActionResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +397,10 @@ partial void ProcessRuntimeCallActionResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +422,10 @@ partial void ProcessRuntimeCallActionResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCancelScheduledEvent.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCancelScheduledEvent.g.cs index c1e6917..10ee60b 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCancelScheduledEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCancelScheduledEvent.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeCancelScheduledEventResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeCancelScheduledEventAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Permanently cancels a scheduled [Event](#schema_event). The event must be in a `scheduled` state. + /// + /// + /// + /// + /// + /// 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 RuntimeCancelScheduledEventAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeCancelScheduledEventResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/events/scheduled/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeCancelScheduledEventResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeCancelScheduledEventResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeCancelScheduledEventResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeCancelScheduledEventResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeCancelScheduledEventResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeCancelScheduledEventResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeCancelScheduledEventResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeCancelScheduledEventResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeCancelScheduledEventResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeCancelScheduledEventResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeConfigureIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeConfigureIntegration.g.cs index 098e01f..3ec7662 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeConfigureIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeConfigureIntegration.g.cs @@ -55,6 +55,30 @@ partial void ProcessRuntimeConfigureIntegrationResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeConfigureIntegrationAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// An integration can call this endpoint to configure itself + /// + /// + /// + /// + /// 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 RuntimeConfigureIntegrationAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessRuntimeConfigureIntegrationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/integrations/configure", baseUri: HttpClient.BaseAddress); @@ -172,6 +197,8 @@ partial void ProcessRuntimeConfigureIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +209,11 @@ partial void ProcessRuntimeConfigureIntegrationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +231,8 @@ partial void ProcessRuntimeConfigureIntegrationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +242,7 @@ partial void ProcessRuntimeConfigureIntegrationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +251,11 @@ partial void ProcessRuntimeConfigureIntegrationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +272,15 @@ partial void ProcessRuntimeConfigureIntegrationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +320,8 @@ partial void ProcessRuntimeConfigureIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +342,8 @@ partial void ProcessRuntimeConfigureIntegrationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +397,10 @@ partial void ProcessRuntimeConfigureIntegrationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +422,10 @@ partial void ProcessRuntimeConfigureIntegrationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateConversation.g.cs index 341d2eb..7547bda 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateConversation.g.cs @@ -55,6 +55,30 @@ partial void ProcessRuntimeCreateConversationResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeCreateConversationAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Creates a new [Conversation](#schema_conversation). When creating a new [Conversation](#schema_conversation), the required tags must be provided. See the specific integration for more details. + /// + /// + /// + /// + /// 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 RuntimeCreateConversationAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessRuntimeCreateConversationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/conversations", baseUri: HttpClient.BaseAddress); @@ -172,6 +197,8 @@ partial void ProcessRuntimeCreateConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +209,11 @@ partial void ProcessRuntimeCreateConversationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +231,8 @@ partial void ProcessRuntimeCreateConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +242,7 @@ partial void ProcessRuntimeCreateConversationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +251,11 @@ partial void ProcessRuntimeCreateConversationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +272,15 @@ partial void ProcessRuntimeCreateConversationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +320,8 @@ partial void ProcessRuntimeCreateConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +342,8 @@ partial void ProcessRuntimeCreateConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +397,10 @@ partial void ProcessRuntimeCreateConversationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +422,10 @@ partial void ProcessRuntimeCreateConversationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateEvent.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateEvent.g.cs index db2d0cb..a8ad752 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateEvent.g.cs @@ -55,6 +55,30 @@ partial void ProcessRuntimeCreateEventResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeCreateEventAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Creates a new [Event](#schema_event). When creating a new [Event](#schema_event), the required tags must be provided. See the specific integration for more details. + /// + /// + /// + /// + /// 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 RuntimeCreateEventAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessRuntimeCreateEventResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/events", baseUri: HttpClient.BaseAddress); @@ -172,6 +197,8 @@ partial void ProcessRuntimeCreateEventResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +209,11 @@ partial void ProcessRuntimeCreateEventResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +231,8 @@ partial void ProcessRuntimeCreateEventResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +242,7 @@ partial void ProcessRuntimeCreateEventResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +251,11 @@ partial void ProcessRuntimeCreateEventResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +272,15 @@ partial void ProcessRuntimeCreateEventResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +320,8 @@ partial void ProcessRuntimeCreateEventResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +342,8 @@ partial void ProcessRuntimeCreateEventResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +397,10 @@ partial void ProcessRuntimeCreateEventResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +422,10 @@ partial void ProcessRuntimeCreateEventResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateMessage.g.cs index d169dce..ff433b2 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateMessage.g.cs @@ -55,6 +55,30 @@ partial void ProcessRuntimeCreateMessageResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeCreateMessageAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Creates a new [Message](#schema_message). When creating a new [Message](#schema_message), the required tags must be provided. See the specific integration for more details. + /// + /// + /// + /// + /// 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 RuntimeCreateMessageAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessRuntimeCreateMessageResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/messages", baseUri: HttpClient.BaseAddress); @@ -172,6 +197,8 @@ partial void ProcessRuntimeCreateMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +209,11 @@ partial void ProcessRuntimeCreateMessageResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +231,8 @@ partial void ProcessRuntimeCreateMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +242,7 @@ partial void ProcessRuntimeCreateMessageResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +251,11 @@ partial void ProcessRuntimeCreateMessageResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +272,15 @@ partial void ProcessRuntimeCreateMessageResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +320,8 @@ partial void ProcessRuntimeCreateMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +342,8 @@ partial void ProcessRuntimeCreateMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +397,10 @@ partial void ProcessRuntimeCreateMessageResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +422,10 @@ partial void ProcessRuntimeCreateMessageResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateUser.g.cs index 486542b..dfa0e63 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateUser.g.cs @@ -55,6 +55,30 @@ partial void ProcessRuntimeCreateUserResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeCreateUserAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Creates a new [User](#schema_user). When creating a new [User](#schema_user), the required tags must be provided. See the specific integration for more details. + /// + /// + /// + /// + /// 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 RuntimeCreateUserAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessRuntimeCreateUserResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/users", baseUri: HttpClient.BaseAddress); @@ -172,6 +197,8 @@ partial void ProcessRuntimeCreateUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +209,11 @@ partial void ProcessRuntimeCreateUserResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +231,8 @@ partial void ProcessRuntimeCreateUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +242,7 @@ partial void ProcessRuntimeCreateUserResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +251,11 @@ partial void ProcessRuntimeCreateUserResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +272,15 @@ partial void ProcessRuntimeCreateUserResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +320,8 @@ partial void ProcessRuntimeCreateUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +342,8 @@ partial void ProcessRuntimeCreateUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +397,10 @@ partial void ProcessRuntimeCreateUserResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +422,10 @@ partial void ProcessRuntimeCreateUserResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteConversation.g.cs index 0430a88..278c1eb 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteConversation.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeDeleteConversationResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeDeleteConversationAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Permanently deletes a [Conversation](#schema_conversation). It cannot be undone. Also immediately deletes corresponding [Messages](#schema_message). + /// + /// + /// + /// + /// + /// 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 RuntimeDeleteConversationAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeDeleteConversationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/conversations/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeDeleteConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeDeleteConversationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeDeleteConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeDeleteConversationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeDeleteConversationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeDeleteConversationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeDeleteConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeDeleteConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeDeleteConversationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeDeleteConversationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteMessage.g.cs index f887efd..2130832 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteMessage.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeDeleteMessageResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeDeleteMessageAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Permanently deletes a [Message](#schema_message). It cannot be undone. + /// + /// + /// + /// + /// + /// 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 RuntimeDeleteMessageAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeDeleteMessageResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/messages/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeDeleteMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeDeleteMessageResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeDeleteMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeDeleteMessageResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeDeleteMessageResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeDeleteMessageResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeDeleteMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeDeleteMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeDeleteMessageResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeDeleteMessageResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteUser.g.cs index 1aebda0..76620d2 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteUser.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeDeleteUserResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeDeleteUserAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Permanently deletes a [User](#schema_user). It cannot be undone. + /// + /// + /// + /// + /// + /// 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 RuntimeDeleteUserAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeDeleteUserResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/users/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeDeleteUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeDeleteUserResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeDeleteUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeDeleteUserResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeDeleteUserResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeDeleteUserResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeDeleteUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeDeleteUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeDeleteUserResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeDeleteUserResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetConversation.g.cs index 591f290..47c1c1b 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetConversation.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeGetConversationResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetConversationAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves the [Conversation](#schema_conversation) object for a valid identifier. + /// + /// + /// + /// + /// + /// 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 RuntimeGetConversationAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeGetConversationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/conversations/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeGetConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeGetConversationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeGetConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeGetConversationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeGetConversationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeGetConversationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeGetConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeGetConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeGetConversationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeGetConversationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetEvent.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetEvent.g.cs index c534274..8fb5fc2 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetEvent.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeGetEventResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetEventAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves the [Event](#schema_event) object for a valid identifiers. + /// + /// + /// + /// + /// + /// 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 RuntimeGetEventAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeGetEventResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/events/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeGetEventResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeGetEventResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeGetEventResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeGetEventResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeGetEventResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeGetEventResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeGetEventResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeGetEventResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeGetEventResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeGetEventResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetMessage.g.cs index 47b1035..028225c 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetMessage.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeGetMessageResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetMessageAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves the [Message](#schema_message) object for a valid identifier. + /// + /// + /// + /// + /// + /// 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 RuntimeGetMessageAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeGetMessageResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/messages/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeGetMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeGetMessageResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeGetMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeGetMessageResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeGetMessageResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeGetMessageResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeGetMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeGetMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeGetMessageResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeGetMessageResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateConversation.g.cs index d32d9cd..4c47a68 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateConversation.g.cs @@ -55,6 +55,30 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetOrCreateConversationAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves the [Conversation](#schema_conversation) object containing given tags. If the conversation does not exist, it will be created. Tags will be updated if they are set in the request body. + /// + /// + /// + /// + /// 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 RuntimeGetOrCreateConversationAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/conversations/get-or-create", baseUri: HttpClient.BaseAddress); @@ -172,6 +197,8 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +209,11 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +231,8 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +242,7 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +251,11 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +272,15 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +320,8 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +342,8 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +397,10 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +422,10 @@ partial void ProcessRuntimeGetOrCreateConversationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateMessage.g.cs index 15fe8b0..7243858 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateMessage.g.cs @@ -55,6 +55,30 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetOrCreateMessageAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves the [Message](#schema_message) object for given discriminating tags. If the message does not exist, it will be created. If the message already exists, its tags and payload will be updated with the provided values if they are defined. + /// + /// + /// + /// + /// 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 RuntimeGetOrCreateMessageAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/messages/get-or-create", baseUri: HttpClient.BaseAddress); @@ -172,6 +197,8 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +209,11 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +231,8 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +242,7 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +251,11 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +272,15 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +320,8 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +342,8 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +397,10 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +422,10 @@ partial void ProcessRuntimeGetOrCreateMessageResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateUser.g.cs index 021b5d7..29b1ca2 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateUser.g.cs @@ -55,6 +55,30 @@ partial void ProcessRuntimeGetOrCreateUserResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetOrCreateUserAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves the [User](#schema_user) object for given discriminating tags. If the user does not exist, it will be created. If the user already exists, its name, pictureUrl, attributes, and tags will be updated with the provided values. + /// + /// + /// + /// + /// 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 RuntimeGetOrCreateUserAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +110,7 @@ partial void ProcessRuntimeGetOrCreateUserResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/users/get-or-create", baseUri: HttpClient.BaseAddress); @@ -172,6 +197,8 @@ partial void ProcessRuntimeGetOrCreateUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +209,11 @@ partial void ProcessRuntimeGetOrCreateUserResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +231,8 @@ partial void ProcessRuntimeGetOrCreateUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +242,7 @@ partial void ProcessRuntimeGetOrCreateUserResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +251,11 @@ partial void ProcessRuntimeGetOrCreateUserResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +272,15 @@ partial void ProcessRuntimeGetOrCreateUserResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +320,8 @@ partial void ProcessRuntimeGetOrCreateUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +342,8 @@ partial void ProcessRuntimeGetOrCreateUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +397,10 @@ partial void ProcessRuntimeGetOrCreateUserResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +422,10 @@ partial void ProcessRuntimeGetOrCreateUserResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrSetState.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrSetState.g.cs index 07dd96e..f915791 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrSetState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrSetState.g.cs @@ -67,6 +67,39 @@ partial void ProcessRuntimeGetOrSetStateResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetOrSetStateAsResponseAsync( + type: type, + id: id, + name: name, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves the [State](#schema_state) object for a valid identifiers. If the state does not exist, it creates a new state. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeGetOrSetStateAsResponseAsync( + global::Botpress.RuntimeGetOrSetStateType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,6 +134,7 @@ partial void ProcessRuntimeGetOrSetStateResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/states/{type}/{id}/{name}/get-or-set", baseUri: HttpClient.BaseAddress); @@ -190,6 +224,8 @@ partial void ProcessRuntimeGetOrSetStateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -200,6 +236,11 @@ partial void ProcessRuntimeGetOrSetStateResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -217,6 +258,8 @@ partial void ProcessRuntimeGetOrSetStateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -226,8 +269,7 @@ partial void ProcessRuntimeGetOrSetStateResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +278,11 @@ partial void ProcessRuntimeGetOrSetStateResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -252,14 +299,15 @@ partial void ProcessRuntimeGetOrSetStateResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -299,6 +347,8 @@ partial void ProcessRuntimeGetOrSetStateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -319,6 +369,8 @@ partial void ProcessRuntimeGetOrSetStateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -372,6 +424,10 @@ partial void ProcessRuntimeGetOrSetStateResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -393,6 +449,10 @@ partial void ProcessRuntimeGetOrSetStateResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetParticipant.g.cs index c5b7126..cc7ad0a 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetParticipant.g.cs @@ -63,6 +63,36 @@ partial void ProcessRuntimeGetParticipantResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetParticipantAsResponseAsync( + id: id, + userId: userId, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves a [Participant](#schema_participant) from a [Conversation](#schema_conversation). + /// + /// + /// + /// + /// + /// + /// 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 RuntimeGetParticipantAsResponseAsync( + string id, + string userId, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -96,6 +126,7 @@ partial void ProcessRuntimeGetParticipantResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/conversations/{id}/participants/{userId}", baseUri: HttpClient.BaseAddress); @@ -184,6 +215,8 @@ partial void ProcessRuntimeGetParticipantResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +227,11 @@ partial void ProcessRuntimeGetParticipantResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +249,8 @@ partial void ProcessRuntimeGetParticipantResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +260,7 @@ partial void ProcessRuntimeGetParticipantResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +269,11 @@ partial void ProcessRuntimeGetParticipantResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +290,15 @@ partial void ProcessRuntimeGetParticipantResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +338,8 @@ partial void ProcessRuntimeGetParticipantResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +360,8 @@ partial void ProcessRuntimeGetParticipantResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -366,6 +415,10 @@ partial void ProcessRuntimeGetParticipantResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -387,6 +440,10 @@ partial void ProcessRuntimeGetParticipantResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetState.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetState.g.cs index 15c98cc..494ab21 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetState.g.cs @@ -67,6 +67,39 @@ partial void ProcessRuntimeGetStateResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetStateAsResponseAsync( + type: type, + id: id, + name: name, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves the [State](#schema_state) object for a valid identifiers. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeGetStateAsResponseAsync( + global::Botpress.RuntimeGetStateType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,6 +134,7 @@ partial void ProcessRuntimeGetStateResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/states/{type}/{id}/{name}", baseUri: HttpClient.BaseAddress); @@ -190,6 +224,8 @@ partial void ProcessRuntimeGetStateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -200,6 +236,11 @@ partial void ProcessRuntimeGetStateResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -217,6 +258,8 @@ partial void ProcessRuntimeGetStateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -226,8 +269,7 @@ partial void ProcessRuntimeGetStateResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +278,11 @@ partial void ProcessRuntimeGetStateResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -252,14 +299,15 @@ partial void ProcessRuntimeGetStateResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -299,6 +347,8 @@ partial void ProcessRuntimeGetStateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -319,6 +369,8 @@ partial void ProcessRuntimeGetStateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -372,6 +424,10 @@ partial void ProcessRuntimeGetStateResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -393,6 +449,10 @@ partial void ProcessRuntimeGetStateResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetUser.g.cs index 4afae13..4669afd 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetUser.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeGetUserResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeGetUserAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves the [User](#schema_user) object for a valid identifier. + /// + /// + /// + /// + /// + /// 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 RuntimeGetUserAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeGetUserResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/users/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeGetUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeGetUserResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeGetUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeGetUserResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeGetUserResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeGetUserResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeGetUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeGetUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeGetUserResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeGetUserResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListConversations.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListConversations.g.cs index 27f4532..d6f1291 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListConversations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListConversations.g.cs @@ -91,6 +91,57 @@ partial void ProcessRuntimeListConversationsResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeListConversationsAsResponseAsync( + xBotId: xBotId, + nextToken: nextToken, + sortField: sortField, + sortDirection: sortDirection, + tags: tags, + participantIds: participantIds, + integrationName: integrationName, + channel: channel, + afterDate: afterDate, + beforeDate: beforeDate, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves a list of [Conversation](#schema_conversation) you’ve previously created. The conversations are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](#tags). + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListConversationsAsResponseAsync( + string xBotId, + string? nextToken = default, + global::Botpress.RuntimeListConversationsSortField? sortField = default, + global::Botpress.RuntimeListConversationsSortDirection? sortDirection = default, + global::System.Collections.Generic.Dictionary? tags = default, + global::System.Collections.Generic.IList? participantIds = default, + string? integrationName = default, + string? channel = default, + string? afterDate = default, + string? beforeDate = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -131,9 +182,10 @@ partial void ProcessRuntimeListConversationsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/conversations", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) .AddOptionalParameter("sortField", sortField?.ToValueString()) @@ -143,7 +195,7 @@ partial void ProcessRuntimeListConversationsResponse( .AddOptionalParameter("integrationName", integrationName) .AddOptionalParameter("channel", channel) .AddOptionalParameter("afterDate", afterDate) - .AddOptionalParameter("beforeDate", beforeDate) + .AddOptionalParameter("beforeDate", beforeDate) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -237,6 +289,8 @@ partial void ProcessRuntimeListConversationsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -247,6 +301,11 @@ partial void ProcessRuntimeListConversationsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -264,6 +323,8 @@ partial void ProcessRuntimeListConversationsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -273,8 +334,7 @@ partial void ProcessRuntimeListConversationsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +343,11 @@ partial void ProcessRuntimeListConversationsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -299,14 +364,15 @@ partial void ProcessRuntimeListConversationsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -346,6 +412,8 @@ partial void ProcessRuntimeListConversationsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -366,6 +434,8 @@ partial void ProcessRuntimeListConversationsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -419,6 +489,10 @@ partial void ProcessRuntimeListConversationsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -440,6 +514,10 @@ partial void ProcessRuntimeListConversationsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListEvents.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListEvents.g.cs index df3b56a..f4fbd3c 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListEvents.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListEvents.g.cs @@ -83,6 +83,51 @@ partial void ProcessRuntimeListEventsResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeListEventsAsResponseAsync( + xBotId: xBotId, + nextToken: nextToken, + type: type, + conversationId: conversationId, + userId: userId, + messageId: messageId, + workflowId: workflowId, + status: status, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves a list of [Event](#schema_event) you’ve previously created. The events are returned in sorted order, with the most recent appearing first. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListEventsAsResponseAsync( + string xBotId, + string? nextToken = default, + string? type = default, + string? conversationId = default, + string? userId = default, + string? messageId = default, + string? workflowId = default, + global::Botpress.RuntimeListEventsStatus? status = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -121,9 +166,10 @@ partial void ProcessRuntimeListEventsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/events", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) .AddOptionalParameter("type", type) @@ -131,7 +177,7 @@ partial void ProcessRuntimeListEventsResponse( .AddOptionalParameter("userId", userId) .AddOptionalParameter("messageId", messageId) .AddOptionalParameter("workflowId", workflowId) - .AddOptionalParameter("status", status?.ToValueString()) + .AddOptionalParameter("status", status?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -223,6 +269,8 @@ partial void ProcessRuntimeListEventsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -233,6 +281,11 @@ partial void ProcessRuntimeListEventsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -250,6 +303,8 @@ partial void ProcessRuntimeListEventsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -259,8 +314,7 @@ partial void ProcessRuntimeListEventsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -269,6 +323,11 @@ partial void ProcessRuntimeListEventsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -285,14 +344,15 @@ partial void ProcessRuntimeListEventsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -332,6 +392,8 @@ partial void ProcessRuntimeListEventsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -352,6 +414,8 @@ partial void ProcessRuntimeListEventsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -405,6 +469,10 @@ partial void ProcessRuntimeListEventsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -426,6 +494,10 @@ partial void ProcessRuntimeListEventsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListMessages.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListMessages.g.cs index 2479568..454056b 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListMessages.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListMessages.g.cs @@ -75,6 +75,45 @@ partial void ProcessRuntimeListMessagesResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeListMessagesAsResponseAsync( + xBotId: xBotId, + nextToken: nextToken, + conversationId: conversationId, + tags: tags, + afterDate: afterDate, + beforeDate: beforeDate, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves a list of [Message](#schema_message) you’ve previously created. The messages are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](/docs/developers/concepts/tags). + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListMessagesAsResponseAsync( + string xBotId, + string? nextToken = default, + string? conversationId = default, + global::System.Collections.Generic.Dictionary? tags = default, + string? afterDate = default, + string? beforeDate = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -111,15 +150,16 @@ partial void ProcessRuntimeListMessagesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/messages", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) .AddOptionalParameter("conversationId", conversationId) .AddOptionalParameter("tags", tags?.ToString()) .AddOptionalParameter("afterDate", afterDate) - .AddOptionalParameter("beforeDate", beforeDate) + .AddOptionalParameter("beforeDate", beforeDate) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -209,6 +249,8 @@ partial void ProcessRuntimeListMessagesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -219,6 +261,11 @@ partial void ProcessRuntimeListMessagesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -236,6 +283,8 @@ partial void ProcessRuntimeListMessagesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -245,8 +294,7 @@ partial void ProcessRuntimeListMessagesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -255,6 +303,11 @@ partial void ProcessRuntimeListMessagesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -271,14 +324,15 @@ partial void ProcessRuntimeListMessagesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -318,6 +372,8 @@ partial void ProcessRuntimeListMessagesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -338,6 +394,8 @@ partial void ProcessRuntimeListMessagesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -391,6 +449,10 @@ partial void ProcessRuntimeListMessagesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -412,6 +474,10 @@ partial void ProcessRuntimeListMessagesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListParticipants.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListParticipants.g.cs index c508107..1518614 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListParticipants.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListParticipants.g.cs @@ -63,6 +63,36 @@ partial void ProcessRuntimeListParticipantsResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeListParticipantsAsResponseAsync( + id: id, + xBotId: xBotId, + nextToken: nextToken, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves a list of [Participant](#schema_participant) for a given [Conversation](#schema_conversation). + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListParticipantsAsResponseAsync( + string id, + string xBotId, + string? nextToken = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -96,11 +126,12 @@ partial void ProcessRuntimeListParticipantsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/conversations/{id}/participants", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("nextToken", nextToken) + .AddOptionalParameter("nextToken", nextToken) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -187,6 +218,8 @@ partial void ProcessRuntimeListParticipantsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -197,6 +230,11 @@ partial void ProcessRuntimeListParticipantsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -214,6 +252,8 @@ partial void ProcessRuntimeListParticipantsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -223,8 +263,7 @@ partial void ProcessRuntimeListParticipantsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -233,6 +272,11 @@ partial void ProcessRuntimeListParticipantsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -249,14 +293,15 @@ partial void ProcessRuntimeListParticipantsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -296,6 +341,8 @@ partial void ProcessRuntimeListParticipantsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -316,6 +363,8 @@ partial void ProcessRuntimeListParticipantsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -369,6 +418,10 @@ partial void ProcessRuntimeListParticipantsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -390,6 +443,10 @@ partial void ProcessRuntimeListParticipantsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListTagValues.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListTagValues.g.cs index fae3afe..addda5f 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListTagValues.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListTagValues.g.cs @@ -67,6 +67,39 @@ partial void ProcessRuntimeListTagValuesResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeListTagValuesAsResponseAsync( + key: key, + type: type, + xBotId: xBotId, + nextToken: nextToken, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Get a bot tag values + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListTagValuesAsResponseAsync( + string key, + global::Botpress.RuntimeListTagValuesType type, + string xBotId, + string? nextToken = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,12 +134,13 @@ partial void ProcessRuntimeListTagValuesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/tags/{key}/values", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) - .AddRequiredParameter("type", type.ToValueString()) + .AddRequiredParameter("type", type.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -194,6 +228,8 @@ partial void ProcessRuntimeListTagValuesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -204,6 +240,11 @@ partial void ProcessRuntimeListTagValuesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -221,6 +262,8 @@ partial void ProcessRuntimeListTagValuesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -230,8 +273,7 @@ partial void ProcessRuntimeListTagValuesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -240,6 +282,11 @@ partial void ProcessRuntimeListTagValuesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -256,14 +303,15 @@ partial void ProcessRuntimeListTagValuesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -303,6 +351,8 @@ partial void ProcessRuntimeListTagValuesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -323,6 +373,8 @@ partial void ProcessRuntimeListTagValuesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -376,6 +428,10 @@ partial void ProcessRuntimeListTagValuesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -397,6 +453,10 @@ partial void ProcessRuntimeListTagValuesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListUsers.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListUsers.g.cs index 8520531..ae37f0a 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListUsers.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListUsers.g.cs @@ -87,6 +87,54 @@ partial void ProcessRuntimeListUsersResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeListUsersAsResponseAsync( + xBotId: xBotId, + nextToken: nextToken, + conversationId: conversationId, + tags: tags, + afterDate: afterDate, + beforeDate: beforeDate, + rangeField: rangeField, + sortField: sortField, + sortDirection: sortDirection, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves a list of [User](#schema_user) previously created. The users are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](/docs/developers/concepts/tags). + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeListUsersAsResponseAsync( + string xBotId, + string? nextToken = default, + string? conversationId = default, + global::System.Collections.Generic.Dictionary? tags = default, + string? afterDate = default, + string? beforeDate = default, + global::Botpress.RuntimeListUsersRangeField? rangeField = default, + global::Botpress.RuntimeListUsersSortField? sortField = default, + global::Botpress.RuntimeListUsersSortDirection? sortDirection = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -126,9 +174,10 @@ partial void ProcessRuntimeListUsersResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/chat/users", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("nextToken", nextToken) .AddOptionalParameter("conversationId", conversationId) @@ -137,7 +186,7 @@ partial void ProcessRuntimeListUsersResponse( .AddOptionalParameter("beforeDate", beforeDate) .AddOptionalParameter("rangeField", rangeField?.ToValueString()) .AddOptionalParameter("sortField", sortField?.ToValueString()) - .AddOptionalParameter("sortDirection", sortDirection?.ToValueString()) + .AddOptionalParameter("sortDirection", sortDirection?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -230,6 +279,8 @@ partial void ProcessRuntimeListUsersResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -240,6 +291,11 @@ partial void ProcessRuntimeListUsersResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -257,6 +313,8 @@ partial void ProcessRuntimeListUsersResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -266,8 +324,7 @@ partial void ProcessRuntimeListUsersResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +333,11 @@ partial void ProcessRuntimeListUsersResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -292,14 +354,15 @@ partial void ProcessRuntimeListUsersResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -339,6 +402,8 @@ partial void ProcessRuntimeListUsersResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -359,6 +424,8 @@ partial void ProcessRuntimeListUsersResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -412,6 +479,10 @@ partial void ProcessRuntimeListUsersResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -433,6 +504,10 @@ partial void ProcessRuntimeListUsersResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimePatchState.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimePatchState.g.cs index a8fb2f6..74689b7 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimePatchState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimePatchState.g.cs @@ -67,6 +67,39 @@ partial void ProcessRuntimePatchStateResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimePatchStateAsResponseAsync( + type: type, + id: id, + name: name, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Updates the [State](#schema_state) object by setting the values of the parameters passed. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimePatchStateAsResponseAsync( + global::Botpress.RuntimePatchStateType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,6 +134,7 @@ partial void ProcessRuntimePatchStateResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/states/{type}/{id}/{name}", baseUri: HttpClient.BaseAddress); @@ -190,6 +224,8 @@ partial void ProcessRuntimePatchStateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -200,6 +236,11 @@ partial void ProcessRuntimePatchStateResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -217,6 +258,8 @@ partial void ProcessRuntimePatchStateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -226,8 +269,7 @@ partial void ProcessRuntimePatchStateResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +278,11 @@ partial void ProcessRuntimePatchStateResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -252,14 +299,15 @@ partial void ProcessRuntimePatchStateResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -299,6 +347,8 @@ partial void ProcessRuntimePatchStateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -319,6 +369,8 @@ partial void ProcessRuntimePatchStateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -372,6 +424,10 @@ partial void ProcessRuntimePatchStateResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -393,6 +449,10 @@ partial void ProcessRuntimePatchStateResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeRemoveParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeRemoveParticipant.g.cs index cc03425..1102eb6 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeRemoveParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeRemoveParticipant.g.cs @@ -63,6 +63,36 @@ partial void ProcessRuntimeRemoveParticipantResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeRemoveParticipantAsResponseAsync( + id: id, + userId: userId, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Remove a [Participant](#schema_participant) from a [Conversation](#schema_conversation). + /// + /// + /// + /// + /// + /// + /// 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 RuntimeRemoveParticipantAsResponseAsync( + string id, + string userId, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -96,6 +126,7 @@ partial void ProcessRuntimeRemoveParticipantResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/conversations/{id}/participants/{userId}", baseUri: HttpClient.BaseAddress); @@ -184,6 +215,8 @@ partial void ProcessRuntimeRemoveParticipantResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +227,11 @@ partial void ProcessRuntimeRemoveParticipantResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +249,8 @@ partial void ProcessRuntimeRemoveParticipantResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +260,7 @@ partial void ProcessRuntimeRemoveParticipantResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +269,11 @@ partial void ProcessRuntimeRemoveParticipantResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +290,15 @@ partial void ProcessRuntimeRemoveParticipantResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +338,8 @@ partial void ProcessRuntimeRemoveParticipantResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +360,8 @@ partial void ProcessRuntimeRemoveParticipantResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -366,6 +415,10 @@ partial void ProcessRuntimeRemoveParticipantResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -387,6 +440,10 @@ partial void ProcessRuntimeRemoveParticipantResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetState.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetState.g.cs index 41bc0d2..6078108 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetState.g.cs @@ -67,6 +67,39 @@ partial void ProcessRuntimeSetStateResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeSetStateAsResponseAsync( + type: type, + id: id, + name: name, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Overrides the [State](#schema_state) object by setting the values of the parameters passed. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeSetStateAsResponseAsync( + global::Botpress.RuntimeSetStateType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,6 +134,7 @@ partial void ProcessRuntimeSetStateResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/states/{type}/{id}/{name}", baseUri: HttpClient.BaseAddress); @@ -190,6 +224,8 @@ partial void ProcessRuntimeSetStateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -200,6 +236,11 @@ partial void ProcessRuntimeSetStateResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -217,6 +258,8 @@ partial void ProcessRuntimeSetStateResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -226,8 +269,7 @@ partial void ProcessRuntimeSetStateResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +278,11 @@ partial void ProcessRuntimeSetStateResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -252,14 +299,15 @@ partial void ProcessRuntimeSetStateResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -299,6 +347,8 @@ partial void ProcessRuntimeSetStateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -319,6 +369,8 @@ partial void ProcessRuntimeSetStateResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -372,6 +424,10 @@ partial void ProcessRuntimeSetStateResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -393,6 +449,10 @@ partial void ProcessRuntimeSetStateResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetStateExpiry.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetStateExpiry.g.cs index efa00cd..946b03f 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetStateExpiry.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetStateExpiry.g.cs @@ -67,6 +67,39 @@ partial void ProcessRuntimeSetStateExpiryResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeSetStateExpiryAsResponseAsync( + type: type, + id: id, + name: name, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Updates the [State](#schema_state) expiry. + /// + /// + /// + /// + /// + /// + /// + /// 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 RuntimeSetStateExpiryAsResponseAsync( + global::Botpress.RuntimeSetStateExpiryType type, + string id, + string name, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,6 +134,7 @@ partial void ProcessRuntimeSetStateExpiryResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/states/{type}/{id}/{name}/expiry", baseUri: HttpClient.BaseAddress); @@ -190,6 +224,8 @@ partial void ProcessRuntimeSetStateExpiryResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -200,6 +236,11 @@ partial void ProcessRuntimeSetStateExpiryResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -217,6 +258,8 @@ partial void ProcessRuntimeSetStateExpiryResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -226,8 +269,7 @@ partial void ProcessRuntimeSetStateExpiryResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +278,11 @@ partial void ProcessRuntimeSetStateExpiryResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -252,14 +299,15 @@ partial void ProcessRuntimeSetStateExpiryResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -299,6 +347,8 @@ partial void ProcessRuntimeSetStateExpiryResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -319,6 +369,8 @@ partial void ProcessRuntimeSetStateExpiryResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -372,6 +424,10 @@ partial void ProcessRuntimeSetStateExpiryResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -393,6 +449,10 @@ partial void ProcessRuntimeSetStateExpiryResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateConversation.g.cs index 849279f..348f58c 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateConversation.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeUpdateConversationResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeUpdateConversationAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update a [Conversation](#schema_conversation) object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + /// + /// + /// + /// + /// + /// 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 RuntimeUpdateConversationAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeUpdateConversationResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/conversations/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeUpdateConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeUpdateConversationResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeUpdateConversationResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeUpdateConversationResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeUpdateConversationResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeUpdateConversationResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeUpdateConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeUpdateConversationResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeUpdateConversationResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeUpdateConversationResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateMessage.g.cs index d6a2497..8289142 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateMessage.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeUpdateMessageResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeUpdateMessageAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Updates a message tags and payload. The message type cannot be changed. Calling this operation from an integration, to update an incoming message, will not invoke the bot. The other way around it also true; Calling this operation from the bot, to update an outgoing message, will not invoke the integration. + /// + /// + /// + /// + /// + /// 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 RuntimeUpdateMessageAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeUpdateMessageResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/messages/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeUpdateMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeUpdateMessageResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeUpdateMessageResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeUpdateMessageResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeUpdateMessageResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeUpdateMessageResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeUpdateMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeUpdateMessageResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeUpdateMessageResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeUpdateMessageResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateUser.g.cs index cc4a0f0..346ef87 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateUser.g.cs @@ -59,6 +59,33 @@ partial void ProcessRuntimeUpdateUserResponse( string? xIntegrationAlias = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RuntimeUpdateUserAsResponseAsync( + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update a [User](#schema_user) object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + /// + /// + /// + /// + /// + /// 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 RuntimeUpdateUserAsResponseAsync( + string id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,6 +118,7 @@ partial void ProcessRuntimeUpdateUserResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/chat/users/{id}", baseUri: HttpClient.BaseAddress); @@ -178,6 +206,8 @@ partial void ProcessRuntimeUpdateUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +218,11 @@ partial void ProcessRuntimeUpdateUserResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +240,8 @@ partial void ProcessRuntimeUpdateUserResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +251,7 @@ partial void ProcessRuntimeUpdateUserResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +260,11 @@ partial void ProcessRuntimeUpdateUserResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +281,15 @@ partial void ProcessRuntimeUpdateUserResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +329,8 @@ partial void ProcessRuntimeUpdateUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +351,8 @@ partial void ProcessRuntimeUpdateUserResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -360,6 +406,10 @@ partial void ProcessRuntimeUpdateUserResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -381,6 +431,10 @@ partial void ProcessRuntimeUpdateUserResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.RuntimeClient.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.g.cs index 324618a..17045e6 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.g.cs @@ -72,10 +72,10 @@ public RuntimeClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public RuntimeClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Botpress.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Botpress.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTable.g.cs index db22596..0525f53 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTable.g.cs @@ -67,6 +67,39 @@ partial void ProcessTablesCreateTableResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesCreateTableAsResponseAsync( + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Initiates the creation of a new table based on the provided schema, excluding system-managed fields like IDs and timestamps. + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesCreateTableAsResponseAsync( + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,6 +134,7 @@ partial void ProcessTablesCreateTableResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/tables", baseUri: HttpClient.BaseAddress); @@ -202,6 +236,8 @@ partial void ProcessTablesCreateTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -212,6 +248,11 @@ partial void ProcessTablesCreateTableResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -229,6 +270,8 @@ partial void ProcessTablesCreateTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -238,8 +281,7 @@ partial void ProcessTablesCreateTableResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -248,6 +290,11 @@ partial void ProcessTablesCreateTableResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -264,14 +311,15 @@ partial void ProcessTablesCreateTableResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -311,6 +359,8 @@ partial void ProcessTablesCreateTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -331,6 +381,8 @@ partial void ProcessTablesCreateTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -384,6 +436,10 @@ partial void ProcessTablesCreateTableResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -405,6 +461,10 @@ partial void ProcessTablesCreateTableResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTableRows.g.cs index f626d11..05cf4ce 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTableRows.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesCreateTableRowsResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesCreateTableRowsAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Inserts one or multiple new rows into the specified table. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesCreateTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesCreateTableRowsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}/rows", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesCreateTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesCreateTableRowsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesCreateTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesCreateTableRowsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesCreateTableRowsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesCreateTableRowsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesCreateTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesCreateTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesCreateTableRowsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesCreateTableRowsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTable.g.cs index 92469ab..39c6745 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTable.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesDeleteTableResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesDeleteTableAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Permanently deletes a table and all its associated data from the system. Use with caution, as this action cannot be undone. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesDeleteTableAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesDeleteTableResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesDeleteTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesDeleteTableResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesDeleteTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesDeleteTableResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesDeleteTableResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesDeleteTableResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesDeleteTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesDeleteTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesDeleteTableResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesDeleteTableResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTableRows.g.cs index db99fba..013f2c7 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTableRows.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesDeleteTableRowsResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesDeleteTableRowsAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Allows selective deletion of rows or complete clearance of a table. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesDeleteTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesDeleteTableRowsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}/rows/delete", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesDeleteTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesDeleteTableRowsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesDeleteTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesDeleteTableRowsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesDeleteTableRowsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesDeleteTableRowsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesDeleteTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesDeleteTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesDeleteTableRowsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesDeleteTableRowsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDuplicateTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDuplicateTable.g.cs index 5771921..53a3789 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDuplicateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDuplicateTable.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesDuplicateTableResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesDuplicateTableAsResponseAsync( + sourceTableId: sourceTableId, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Duplicates the table schema & content + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesDuplicateTableAsResponseAsync( + string sourceTableId, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesDuplicateTableResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{sourceTableId}/duplicate", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesDuplicateTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesDuplicateTableResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesDuplicateTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesDuplicateTableResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesDuplicateTableResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesDuplicateTableResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesDuplicateTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesDuplicateTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesDuplicateTableResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesDuplicateTableResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesFindTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesFindTableRows.g.cs index 91fe8ba..0e6a589 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesFindTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesFindTableRows.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesFindTableRowsResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesFindTableRowsAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Enables the search and filtering of rows within a table based on specific criteria. This operation supports complex queries for advanced data manipulation and retrieval. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesFindTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesFindTableRowsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}/rows/find", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesFindTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesFindTableRowsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesFindTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesFindTableRowsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesFindTableRowsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesFindTableRowsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesFindTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesFindTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesFindTableRowsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesFindTableRowsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetOrCreateTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetOrCreateTable.g.cs index 0a0f046..6afcf2c 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetOrCreateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetOrCreateTable.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesGetOrCreateTableResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesGetOrCreateTableAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves information about a specific table if it exists; otherwise, creates a new table based on the provided schema. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesGetOrCreateTableAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesGetOrCreateTableResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesGetOrCreateTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesGetOrCreateTableResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesGetOrCreateTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesGetOrCreateTableResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesGetOrCreateTableResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesGetOrCreateTableResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesGetOrCreateTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesGetOrCreateTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesGetOrCreateTableResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesGetOrCreateTableResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTable.g.cs index 930a282..a115ec6 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTable.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesGetTableResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesGetTableAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves detailed information about a specific table, identified by its name or unique identifier. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesGetTableAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesGetTableResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesGetTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesGetTableResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesGetTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesGetTableResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesGetTableResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesGetTableResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesGetTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesGetTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesGetTableResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesGetTableResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTableRow.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTableRow.g.cs index 738bc06..ab83093 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTableRow.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTableRow.g.cs @@ -75,6 +75,45 @@ partial void ProcessTablesGetTableRowResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesGetTableRowAsResponseAsync( + table: table, + id: id, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Fetches a specific row from a table using the row's unique identifier. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesGetTableRowAsResponseAsync( + string table, + int id, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -111,11 +150,12 @@ partial void ProcessTablesGetTableRowResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}/row", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("id", id.ToString()!) + .AddRequiredParameter("id", id.ToString()!) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -217,6 +257,8 @@ partial void ProcessTablesGetTableRowResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -227,6 +269,11 @@ partial void ProcessTablesGetTableRowResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -244,6 +291,8 @@ partial void ProcessTablesGetTableRowResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -253,8 +302,7 @@ partial void ProcessTablesGetTableRowResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +311,11 @@ partial void ProcessTablesGetTableRowResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -279,14 +332,15 @@ partial void ProcessTablesGetTableRowResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -326,6 +380,8 @@ partial void ProcessTablesGetTableRowResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -346,6 +402,8 @@ partial void ProcessTablesGetTableRowResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -399,6 +457,10 @@ partial void ProcessTablesGetTableRowResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -420,6 +482,10 @@ partial void ProcessTablesGetTableRowResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesListTables.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesListTables.g.cs index 1b0b75a..c1f2b07 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesListTables.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesListTables.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesListTablesResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesListTablesAsResponseAsync( + xBotId: xBotId, + tags: tags, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Retrieves a list of all tables associated with your bot. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesListTablesAsResponseAsync( + string xBotId, + global::System.Collections.Generic.Dictionary? tags = default, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,11 +142,12 @@ partial void ProcessTablesListTablesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: "/v1/tables", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("tags", tags?.ToString()) + .AddOptionalParameter("tags", tags?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Botpress.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -211,6 +248,8 @@ partial void ProcessTablesListTablesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -221,6 +260,11 @@ partial void ProcessTablesListTablesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -238,6 +282,8 @@ partial void ProcessTablesListTablesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -247,8 +293,7 @@ partial void ProcessTablesListTablesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +302,11 @@ partial void ProcessTablesListTablesResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -273,14 +323,15 @@ partial void ProcessTablesListTablesResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -320,6 +371,8 @@ partial void ProcessTablesListTablesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -340,6 +393,8 @@ partial void ProcessTablesListTablesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -393,6 +448,10 @@ partial void ProcessTablesListTablesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -414,6 +473,10 @@ partial void ProcessTablesListTablesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesRenameTableColumn.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesRenameTableColumn.g.cs index fbfb5a9..bbe712b 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesRenameTableColumn.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesRenameTableColumn.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesRenameTableColumnResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesRenameTableColumnAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Renames an existing column within a table to better reflect its content or usage. The operation targets a specific table and requires the current and new column names. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesRenameTableColumnAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesRenameTableColumnResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}/column", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesRenameTableColumnResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesRenameTableColumnResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesRenameTableColumnResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesRenameTableColumnResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesRenameTableColumnResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesRenameTableColumnResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesRenameTableColumnResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesRenameTableColumnResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesRenameTableColumnResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesRenameTableColumnResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTable.g.cs index 996c626..346e76e 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTable.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesUpdateTableResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesUpdateTableAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Updates the schema or the name of an existing table. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesUpdateTableAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesUpdateTableResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesUpdateTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesUpdateTableResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesUpdateTableResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesUpdateTableResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesUpdateTableResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesUpdateTableResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesUpdateTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesUpdateTableResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesUpdateTableResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesUpdateTableResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTableRows.g.cs index 0822719..d85471e 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTableRows.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesUpdateTableRowsResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesUpdateTableRowsAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Updates specified rows in a table, allowing partial success with detailed feedback on errors. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesUpdateTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesUpdateTableRowsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}/rows", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesUpdateTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesUpdateTableRowsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesUpdateTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesUpdateTableRowsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesUpdateTableRowsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesUpdateTableRowsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesUpdateTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesUpdateTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesUpdateTableRowsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesUpdateTableRowsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpsertTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpsertTableRows.g.cs index da0d95e..b5f4911 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpsertTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpsertTableRows.g.cs @@ -71,6 +71,42 @@ partial void ProcessTablesUpsertTableRowsResponse( string? xUserRole = default, global::Botpress.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await TablesUpsertTableRowsAsResponseAsync( + table: table, + xBotId: xBotId, + xIntegrationId: xIntegrationId, + xIntegrationAlias: xIntegrationAlias, + xIntegrationName: xIntegrationName, + xUserId: xUserId, + xUserRole: xUserRole, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Inserts or updates rows based on a key. If a row exists, it is updated; otherwise, a new row is created. + /// + /// + /// + /// + /// + /// + /// + /// + /// 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 TablesUpsertTableRowsAsResponseAsync( + string table, + string xBotId, + string? xIntegrationId = default, + string? xIntegrationAlias = default, + string? xIntegrationName = default, + string? xUserId = default, + string? xUserRole = default, + global::Botpress.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,6 +142,7 @@ partial void ProcessTablesUpsertTableRowsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Botpress.PathBuilder( path: $"/v1/tables/{table}/rows/upsert", baseUri: HttpClient.BaseAddress); @@ -208,6 +245,8 @@ partial void ProcessTablesUpsertTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -218,6 +257,11 @@ partial void ProcessTablesUpsertTableRowsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -235,6 +279,8 @@ partial void ProcessTablesUpsertTableRowsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -244,8 +290,7 @@ partial void ProcessTablesUpsertTableRowsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -254,6 +299,11 @@ partial void ProcessTablesUpsertTableRowsResponse( __attempt < __maxAttempts && global::Botpress.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Botpress.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Botpress.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Botpress.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -270,14 +320,15 @@ partial void ProcessTablesUpsertTableRowsResponse( 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::Botpress.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -317,6 +368,8 @@ partial void ProcessTablesUpsertTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -337,6 +390,8 @@ partial void ProcessTablesUpsertTableRowsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -390,6 +445,10 @@ partial void ProcessTablesUpsertTableRowsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -411,6 +470,10 @@ partial void ProcessTablesUpsertTableRowsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Botpress.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Botpress.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Botpress/Generated/Botpress.TablesClient.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.g.cs index 0125bf4..b701f64 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.g.cs @@ -72,10 +72,10 @@ public TablesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TablesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Botpress.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Botpress.AutoSDKClientOptions? options, bool disposeHttpClient = true) {