diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.2.Json.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.2.Json.g.cs
index 7022658..18975c9 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.2.Json.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.2.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::Mixedbread.AnyOf?;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Mixedbread.AnyOf? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize>(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::Mixedbread.AnyOf?;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync?>(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.3.Json.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.3.Json.g.cs
index d24e7d4..18bc6f3 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.3.Json.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.3.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::Mixedbread.AnyOf?;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Mixedbread.AnyOf? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize>(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::Mixedbread.AnyOf?;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync?>(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.4.Json.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.4.Json.g.cs
index eff53c6..66e32ef 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.4.Json.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.4.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::Mixedbread.AnyOf?;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Mixedbread.AnyOf? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize>(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::Mixedbread.AnyOf?;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync?>(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.6.Json.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.6.Json.g.cs
index cfdac0c..7a0c330 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.6.Json.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.6.Json.g.cs
@@ -16,6 +16,14 @@ public string ToJson(
jsonSerializerContext);
}
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
///
@@ -26,6 +34,11 @@ public string ToJson(
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
@@ -44,6 +57,17 @@ public string ToJson(
jsonSerializerContext) as global::Mixedbread.AnyOf?;
}
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Mixedbread.AnyOf? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON string using the provided JsonSerializerOptions.
///
@@ -55,6 +79,13 @@ public string ToJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.Deserialize>(
json,
jsonSerializerOptions);
@@ -73,6 +104,17 @@ public string ToJson(
jsonSerializerContext).ConfigureAwait(false)) as global::Mixedbread.AnyOf?;
}
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
///
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
///
@@ -84,6 +126,13 @@ public string ToJson(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Mixedbread.SourceGenerationContext.Default);
+ }
+
return global::System.Text.Json.JsonSerializer.DeserializeAsync?>(
jsonStream,
jsonSerializerOptions);
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.CreateBucket.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.CreateBucket.g.cs
new file mode 100644
index 0000000..ad3f6c0
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.CreateBucket.g.cs
@@ -0,0 +1,590 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class BucketsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_CreateBucketServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_CreateBucketSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_CreateBucketSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_CreateBucketSecurityRequirement0,
+ };
+ partial void PrepareCreateBucketArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Mixedbread.BucketCreateParams request);
+ partial void PrepareCreateBucketRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Mixedbread.BucketCreateParams request);
+ partial void ProcessCreateBucketResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessCreateBucketResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Add a bucket
+ /// Attach a customer-owned storage bucket to the organization.
+ /// Access is validated against the bucket (reachability + write/delete probe) before
+ /// anything is stored, so an unreachable or unwritable bucket is rejected here.
+ /// With `assume_role` credentials (recommended for AWS) the probe performs the actual
+ /// STS AssumeRole and nothing secret is persisted — only the role ARN and the
+ /// organization's external ID. With `access_key` credentials (S3-compatible
+ /// endpoints) the keys are encrypted before they are stored.
+ /// Args:
+ /// params: The bucket connection details and credentials.
+ /// Returns:
+ /// Bucket: The attached bucket. Credentials are never returned.
+ ///
+ ///
+ /// 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 CreateBucketAsync(
+
+ global::Mixedbread.BucketCreateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateBucketAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Add a bucket
+ /// Attach a customer-owned storage bucket to the organization.
+ /// Access is validated against the bucket (reachability + write/delete probe) before
+ /// anything is stored, so an unreachable or unwritable bucket is rejected here.
+ /// With `assume_role` credentials (recommended for AWS) the probe performs the actual
+ /// STS AssumeRole and nothing secret is persisted — only the role ARN and the
+ /// organization's external ID. With `access_key` credentials (S3-compatible
+ /// endpoints) the keys are encrypted before they are stored.
+ /// Args:
+ /// params: The bucket connection details and credentials.
+ /// Returns:
+ /// Bucket: The attached bucket. Credentials are never returned.
+ ///
+ ///
+ /// 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> CreateBucketAsResponseAsync(
+
+ global::Mixedbread.BucketCreateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareCreateBucketArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_CreateBucketSecurityRequirements,
+ operationName: "CreateBucketAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/buckets",
+ baseUri: ResolveBaseUri(
+ servers: s_CreateBucketServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareCreateBucketRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateBucket",
+ methodName: "CreateBucketAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateBucket",
+ methodName: "CreateBucketAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateBucket",
+ methodName: "CreateBucketAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessCreateBucketResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateBucket",
+ methodName: "CreateBucketAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateBucket",
+ methodName: "CreateBucketAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessCreateBucketResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.Bucket.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.Bucket.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Add a bucket
+ /// Attach a customer-owned storage bucket to the organization.
+ /// Access is validated against the bucket (reachability + write/delete probe) before
+ /// anything is stored, so an unreachable or unwritable bucket is rejected here.
+ /// With `assume_role` credentials (recommended for AWS) the probe performs the actual
+ /// STS AssumeRole and nothing secret is persisted — only the role ARN and the
+ /// organization's external ID. With `access_key` credentials (S3-compatible
+ /// endpoints) the keys are encrypted before they are stored.
+ /// Args:
+ /// params: The bucket connection details and credentials.
+ /// Returns:
+ /// Bucket: The attached bucket. Credentials are never returned.
+ ///
+ ///
+ /// Display name for the bucket
+ ///
+ ///
+ /// Object storage provider
+ /// Default Value: aws_s3
+ ///
+ ///
+ /// The bucket name
+ ///
+ ///
+ /// The bucket region
+ ///
+ ///
+ /// Custom S3-compatible endpoint (omit for AWS)
+ ///
+ ///
+ /// Key prefix within the bucket
+ ///
+ ///
+ /// KMS key id/ARN to encrypt writes with (SSE-KMS); omit for the bucket's default encryption
+ ///
+ ///
+ /// How Mixedbread authenticates against the bucket. `assume_role` is the recommended default for AWS; `access_key` is for S3-compatible providers with a custom 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 CreateBucketAsync(
+ string name,
+ string bucket,
+ global::Mixedbread.Credentials credentials,
+ string? provider = default,
+ string? region = default,
+ string? endpointUrl = default,
+ string? prefix = default,
+ string? sseKmsKeyId = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Mixedbread.BucketCreateParams
+ {
+ Name = name,
+ Provider = provider,
+ Bucket = bucket,
+ Region = region,
+ EndpointUrl = endpointUrl,
+ Prefix = prefix,
+ SseKmsKeyId = sseKmsKeyId,
+ Credentials = credentials,
+ };
+
+ return await CreateBucketAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.ListBuckets.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.ListBuckets.g.cs
new file mode 100644
index 0000000..1394189
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.ListBuckets.g.cs
@@ -0,0 +1,553 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class BucketsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_ListBucketsServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_ListBucketsSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_ListBucketsSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_ListBucketsSecurityRequirement0,
+ };
+ partial void PrepareListBucketsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? limit,
+ ref string? after,
+ ref string? before,
+ ref bool? includeTotal);
+ partial void PrepareListBucketsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? limit,
+ string? after,
+ string? before,
+ bool? includeTotal);
+ partial void ProcessListBucketsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListBucketsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List buckets
+ /// List the organization's connected buckets.
+ /// Non-secret auth metadata (auth type, role ARN, external ID) is included;
+ /// access-key credentials are never returned.
+ /// Args:
+ /// options: The pagination options.
+ /// Returns:
+ /// BucketListResponse: The list of buckets.
+ ///
+ ///
+ /// Maximum number of items to return per page (1-100)
+ /// Default Value: 20
+ ///
+ ///
+ /// Cursor for forward pagination - get items after this position. Use last_cursor from previous response.
+ ///
+ ///
+ /// Cursor for backward pagination - get items before this position. Use first_cursor from previous response.
+ ///
+ ///
+ /// Whether to include total count in response (expensive operation)
+ /// Default Value: false
+ ///
+ /// 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 ListBucketsAsync(
+ int? limit = default,
+ string? after = default,
+ string? before = default,
+ bool? includeTotal = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListBucketsAsResponseAsync(
+ limit: limit,
+ after: after,
+ before: before,
+ includeTotal: includeTotal,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List buckets
+ /// List the organization's connected buckets.
+ /// Non-secret auth metadata (auth type, role ARN, external ID) is included;
+ /// access-key credentials are never returned.
+ /// Args:
+ /// options: The pagination options.
+ /// Returns:
+ /// BucketListResponse: The list of buckets.
+ ///
+ ///
+ /// Maximum number of items to return per page (1-100)
+ /// Default Value: 20
+ ///
+ ///
+ /// Cursor for forward pagination - get items after this position. Use last_cursor from previous response.
+ ///
+ ///
+ /// Cursor for backward pagination - get items before this position. Use first_cursor from previous response.
+ ///
+ ///
+ /// Whether to include total count in response (expensive operation)
+ /// Default Value: false
+ ///
+ /// 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> ListBucketsAsResponseAsync(
+ int? limit = default,
+ string? after = default,
+ string? before = default,
+ bool? includeTotal = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListBucketsArguments(
+ httpClient: HttpClient,
+ limit: ref limit,
+ after: ref after,
+ before: ref before,
+ includeTotal: ref includeTotal);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListBucketsSecurityRequirements,
+ operationName: "ListBucketsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/buckets",
+ baseUri: ResolveBaseUri(
+ servers: s_ListBucketsServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ __pathBuilder
+ .AddOptionalParameter("limit", limit?.ToString())
+ .AddOptionalParameter("after", after)
+ .AddOptionalParameter("before", before)
+ .AddOptionalParameter("include_total", includeTotal?.ToString().ToLowerInvariant())
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListBucketsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ limit: limit,
+ after: after,
+ before: before,
+ includeTotal: includeTotal);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBuckets",
+ methodName: "ListBucketsAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBuckets",
+ methodName: "ListBucketsAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBuckets",
+ methodName: "ListBucketsAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListBucketsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBuckets",
+ methodName: "ListBucketsAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBuckets",
+ methodName: "ListBucketsAsync",
+ pathTemplate: "\"/v1/buckets\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListBucketsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.BucketListResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.BucketListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.RotateBucketCredentials.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.RotateBucketCredentials.g.cs
new file mode 100644
index 0000000..43e8372
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.RotateBucketCredentials.g.cs
@@ -0,0 +1,569 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class BucketsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_RotateBucketCredentialsServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_RotateBucketCredentialsSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_RotateBucketCredentialsSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_RotateBucketCredentialsSecurityRequirement0,
+ };
+ partial void PrepareRotateBucketCredentialsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid bucketId,
+ global::Mixedbread.BucketRotateCredentialsParams request);
+ partial void PrepareRotateBucketCredentialsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid bucketId,
+ global::Mixedbread.BucketRotateCredentialsParams request);
+ partial void ProcessRotateBucketCredentialsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessRotateBucketCredentialsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Rotate bucket credentials
+ /// Replace a bucket's stored credentials.
+ /// Only available for `access_key` buckets — `assume_role` buckets store no
+ /// credentials (manage access via the role's trust policy instead). The new
+ /// credentials are re-validated against the bucket's existing (immutable) identity
+ /// before they are persisted. The credentials version is bumped so cached storage clients rebuild.
+ /// Args:
+ /// bucket_id: The ID of the bucket to rotate credentials for.
+ /// params: The new bucket access credentials.
+ /// Returns:
+ /// Bucket: The updated bucket. Credentials are never returned.
+ ///
+ ///
+ /// The ID of the bucket to rotate credentials for
+ ///
+ ///
+ /// 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 RotateBucketCredentialsAsync(
+ global::System.Guid bucketId,
+
+ global::Mixedbread.BucketRotateCredentialsParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await RotateBucketCredentialsAsResponseAsync(
+ bucketId: bucketId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Rotate bucket credentials
+ /// Replace a bucket's stored credentials.
+ /// Only available for `access_key` buckets — `assume_role` buckets store no
+ /// credentials (manage access via the role's trust policy instead). The new
+ /// credentials are re-validated against the bucket's existing (immutable) identity
+ /// before they are persisted. The credentials version is bumped so cached storage clients rebuild.
+ /// Args:
+ /// bucket_id: The ID of the bucket to rotate credentials for.
+ /// params: The new bucket access credentials.
+ /// Returns:
+ /// Bucket: The updated bucket. Credentials are never returned.
+ ///
+ ///
+ /// The ID of the bucket to rotate credentials for
+ ///
+ ///
+ /// 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> RotateBucketCredentialsAsResponseAsync(
+ global::System.Guid bucketId,
+
+ global::Mixedbread.BucketRotateCredentialsParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareRotateBucketCredentialsArguments(
+ httpClient: HttpClient,
+ bucketId: ref bucketId,
+ request: request);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_RotateBucketCredentialsSecurityRequirements,
+ operationName: "RotateBucketCredentialsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: $"/v1/buckets/{bucketId}/credentials",
+ baseUri: ResolveBaseUri(
+ servers: s_RotateBucketCredentialsServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareRotateBucketCredentialsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ bucketId: bucketId!,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateBucketCredentials",
+ methodName: "RotateBucketCredentialsAsync",
+ pathTemplate: "$\"/v1/buckets/{bucketId}/credentials\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateBucketCredentials",
+ methodName: "RotateBucketCredentialsAsync",
+ pathTemplate: "$\"/v1/buckets/{bucketId}/credentials\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateBucketCredentials",
+ methodName: "RotateBucketCredentialsAsync",
+ pathTemplate: "$\"/v1/buckets/{bucketId}/credentials\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessRotateBucketCredentialsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateBucketCredentials",
+ methodName: "RotateBucketCredentialsAsync",
+ pathTemplate: "$\"/v1/buckets/{bucketId}/credentials\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateBucketCredentials",
+ methodName: "RotateBucketCredentialsAsync",
+ pathTemplate: "$\"/v1/buckets/{bucketId}/credentials\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessRotateBucketCredentialsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.Bucket.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.Bucket.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Rotate bucket credentials
+ /// Replace a bucket's stored credentials.
+ /// Only available for `access_key` buckets — `assume_role` buckets store no
+ /// credentials (manage access via the role's trust policy instead). The new
+ /// credentials are re-validated against the bucket's existing (immutable) identity
+ /// before they are persisted. The credentials version is bumped so cached storage clients rebuild.
+ /// Args:
+ /// bucket_id: The ID of the bucket to rotate credentials for.
+ /// params: The new bucket access credentials.
+ /// Returns:
+ /// Bucket: The updated bucket. Credentials are never returned.
+ ///
+ ///
+ /// The ID of the bucket to rotate credentials for
+ ///
+ ///
+ /// New bucket access credentials
+ ///
+ /// 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 RotateBucketCredentialsAsync(
+ global::System.Guid bucketId,
+ global::Mixedbread.BucketAccessKeyCredentials credentials,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Mixedbread.BucketRotateCredentialsParams
+ {
+ Credentials = credentials,
+ };
+
+ return await RotateBucketCredentialsAsync(
+ bucketId: bucketId,
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.g.cs
new file mode 100644
index 0000000..ebe8e41
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.BucketsClient.g.cs
@@ -0,0 +1,294 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public sealed partial class BucketsClient : global::Mixedbread.IBucketsClient, global::System.IDisposable
+ {
+ ///
+ /// mixedbread ai production server
+ ///
+ public const string DefaultBaseUrl = "https://api.mixedbread.com/";
+
+ private bool _disposeHttpClient = true;
+
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ public System.Uri? BaseUri => ResolveDisplayedBaseUri();
+
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
+
+ ///
+ public global::Mixedbread.AutoSDKClientOptions Options { get; }
+
+
+ internal global::Mixedbread.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::Mixedbread.AutoSDKServerConfiguration();
+ ///
+ ///
+ ///
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default;
+
+
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_availableServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+ ///
+ /// The server options available for this client.
+ ///
+ public global::System.Collections.Generic.IReadOnlyList AvailableServers => s_availableServers;
+
+ ///
+ /// The currently selected server for this client, if any.
+ ///
+ public global::Mixedbread.AutoSDKServer? SelectedServer
+ {
+ get => ResolveSelectedServer();
+ set => SelectServer(value);
+ }
+
+ ///
+ /// Creates a new instance of the BucketsClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BucketsClient(
+ global::System.Net.Http.HttpClient? httpClient = null,
+ global::System.Uri? baseUri = null,
+ global::System.Collections.Generic.List? authorizations = null,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri,
+ authorizations,
+ options: null,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the BucketsClient with explicit options but no base URL override.
+ /// Skips passing baseUri so the default base URL from the OpenAPI spec applies.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BucketsClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Collections.Generic.List? authorizations,
+ global::Mixedbread.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri: null,
+ authorizations,
+ options,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the BucketsClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BucketsClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Mixedbread.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true)
+ {
+
+ HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
+ if (baseUri is not null)
+ {
+ HttpClient.BaseAddress ??= baseUri;
+ }
+ Authorizations = authorizations ?? new global::System.Collections.Generic.List();
+ Options = options ?? new global::Mixedbread.AutoSDKClientOptions();
+ _disposeHttpClient = disposeHttpClient;
+
+ AutoSDKServerConfiguration.ExplicitBaseUri = baseUri ?? httpClient?.BaseAddress;
+
+ Initialized(HttpClient);
+ }
+
+ ///
+ public void Dispose()
+ {
+ if (_disposeHttpClient)
+ {
+ HttpClient.Dispose();
+ }
+ }
+
+ partial void Initialized(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareArguments(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareRequest(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpRequestMessage request);
+ partial void ProcessResponse(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response);
+ partial void ProcessResponseContent(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response,
+ ref string content);
+
+
+ ///
+ /// Selects one of the generated server options by id.
+ ///
+ public bool TrySelectServer(string serverId)
+ {
+ if (string.IsNullOrWhiteSpace(serverId))
+ {
+ return false;
+ }
+
+ foreach (var server in s_availableServers)
+ {
+ if (string.Equals(server.Id, serverId, global::System.StringComparison.OrdinalIgnoreCase))
+ {
+ AutoSDKServerConfiguration.SelectedServer = server;
+ AutoSDKServerConfiguration.ExplicitBaseUri = null;
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ ///
+ /// Clears the currently selected server.
+ ///
+ public void ClearSelectedServer()
+ {
+ AutoSDKServerConfiguration.SelectedServer = null;
+ }
+
+ private global::Mixedbread.AutoSDKServer? ResolveSelectedServer()
+ {
+ var selectedServer = AutoSDKServerConfiguration.SelectedServer;
+ if (selectedServer is null)
+ {
+ return null;
+ }
+
+ foreach (var server in s_availableServers)
+ {
+ if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal))
+ {
+ return server;
+ }
+ }
+
+ return null;
+ }
+
+ private void SelectServer(global::Mixedbread.AutoSDKServer? server)
+ {
+ if (server is null)
+ {
+ AutoSDKServerConfiguration.SelectedServer = null;
+ return;
+ }
+
+ foreach (var candidate in s_availableServers)
+ {
+ if (string.Equals(candidate.Id, server.Id, global::System.StringComparison.Ordinal))
+ {
+ AutoSDKServerConfiguration.SelectedServer = candidate;
+ AutoSDKServerConfiguration.ExplicitBaseUri = null;
+ return;
+ }
+ }
+
+ throw new global::System.ArgumentException("The provided server is not available for this client.", nameof(server));
+ }
+
+ private global::System.Uri? ResolveDisplayedBaseUri()
+ {
+ if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri)
+ {
+ return explicitBaseUri;
+ }
+
+ return ResolveSelectedServer()?.Uri ?? (s_availableServers.Length > 0 ? s_availableServers[0].Uri : HttpClient.BaseAddress);
+ }
+
+ private global::System.Uri? ResolveBaseUri(
+ global::Mixedbread.AutoSDKServer[] servers,
+ string defaultBaseUrl)
+ {
+ if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri)
+ {
+ return explicitBaseUri;
+ }
+
+ if (AutoSDKServerConfiguration.SelectedServer is global::Mixedbread.AutoSDKServer selectedServer)
+ {
+ foreach (var server in servers)
+ {
+ if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal))
+ {
+ return server.Uri;
+ }
+ }
+ }
+
+ if (servers.Length > 0)
+ {
+ return servers[0].Uri;
+ }
+
+ return string.IsNullOrWhiteSpace(defaultBaseUrl)
+ ? HttpClient.BaseAddress
+ : new global::System.Uri(defaultBaseUrl, global::System.UriKind.RelativeOrAbsolute);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.CreateBucket.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.CreateBucket.g.cs
new file mode 100644
index 0000000..4089fad
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.CreateBucket.g.cs
@@ -0,0 +1,107 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IBucketsClient
+ {
+ ///
+ /// Add a bucket
+ /// Attach a customer-owned storage bucket to the organization.
+ /// Access is validated against the bucket (reachability + write/delete probe) before
+ /// anything is stored, so an unreachable or unwritable bucket is rejected here.
+ /// With `assume_role` credentials (recommended for AWS) the probe performs the actual
+ /// STS AssumeRole and nothing secret is persisted — only the role ARN and the
+ /// organization's external ID. With `access_key` credentials (S3-compatible
+ /// endpoints) the keys are encrypted before they are stored.
+ /// Args:
+ /// params: The bucket connection details and credentials.
+ /// Returns:
+ /// Bucket: The attached bucket. Credentials are never returned.
+ ///
+ ///
+ /// 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 CreateBucketAsync(
+
+ global::Mixedbread.BucketCreateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Add a bucket
+ /// Attach a customer-owned storage bucket to the organization.
+ /// Access is validated against the bucket (reachability + write/delete probe) before
+ /// anything is stored, so an unreachable or unwritable bucket is rejected here.
+ /// With `assume_role` credentials (recommended for AWS) the probe performs the actual
+ /// STS AssumeRole and nothing secret is persisted — only the role ARN and the
+ /// organization's external ID. With `access_key` credentials (S3-compatible
+ /// endpoints) the keys are encrypted before they are stored.
+ /// Args:
+ /// params: The bucket connection details and credentials.
+ /// Returns:
+ /// Bucket: The attached bucket. Credentials are never returned.
+ ///
+ ///
+ /// 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> CreateBucketAsResponseAsync(
+
+ global::Mixedbread.BucketCreateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Add a bucket
+ /// Attach a customer-owned storage bucket to the organization.
+ /// Access is validated against the bucket (reachability + write/delete probe) before
+ /// anything is stored, so an unreachable or unwritable bucket is rejected here.
+ /// With `assume_role` credentials (recommended for AWS) the probe performs the actual
+ /// STS AssumeRole and nothing secret is persisted — only the role ARN and the
+ /// organization's external ID. With `access_key` credentials (S3-compatible
+ /// endpoints) the keys are encrypted before they are stored.
+ /// Args:
+ /// params: The bucket connection details and credentials.
+ /// Returns:
+ /// Bucket: The attached bucket. Credentials are never returned.
+ ///
+ ///
+ /// Display name for the bucket
+ ///
+ ///
+ /// Object storage provider
+ /// Default Value: aws_s3
+ ///
+ ///
+ /// The bucket name
+ ///
+ ///
+ /// The bucket region
+ ///
+ ///
+ /// Custom S3-compatible endpoint (omit for AWS)
+ ///
+ ///
+ /// Key prefix within the bucket
+ ///
+ ///
+ /// KMS key id/ARN to encrypt writes with (SSE-KMS); omit for the bucket's default encryption
+ ///
+ ///
+ /// How Mixedbread authenticates against the bucket. `assume_role` is the recommended default for AWS; `access_key` is for S3-compatible providers with a custom 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 CreateBucketAsync(
+ string name,
+ string bucket,
+ global::Mixedbread.Credentials credentials,
+ string? provider = default,
+ string? region = default,
+ string? endpointUrl = default,
+ string? prefix = default,
+ string? sseKmsKeyId = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.ListBuckets.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.ListBuckets.g.cs
new file mode 100644
index 0000000..2d73e80
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.ListBuckets.g.cs
@@ -0,0 +1,76 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IBucketsClient
+ {
+ ///
+ /// List buckets
+ /// List the organization's connected buckets.
+ /// Non-secret auth metadata (auth type, role ARN, external ID) is included;
+ /// access-key credentials are never returned.
+ /// Args:
+ /// options: The pagination options.
+ /// Returns:
+ /// BucketListResponse: The list of buckets.
+ ///
+ ///
+ /// Maximum number of items to return per page (1-100)
+ /// Default Value: 20
+ ///
+ ///
+ /// Cursor for forward pagination - get items after this position. Use last_cursor from previous response.
+ ///
+ ///
+ /// Cursor for backward pagination - get items before this position. Use first_cursor from previous response.
+ ///
+ ///
+ /// Whether to include total count in response (expensive operation)
+ /// Default Value: false
+ ///
+ /// 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 ListBucketsAsync(
+ int? limit = default,
+ string? after = default,
+ string? before = default,
+ bool? includeTotal = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List buckets
+ /// List the organization's connected buckets.
+ /// Non-secret auth metadata (auth type, role ARN, external ID) is included;
+ /// access-key credentials are never returned.
+ /// Args:
+ /// options: The pagination options.
+ /// Returns:
+ /// BucketListResponse: The list of buckets.
+ ///
+ ///
+ /// Maximum number of items to return per page (1-100)
+ /// Default Value: 20
+ ///
+ ///
+ /// Cursor for forward pagination - get items after this position. Use last_cursor from previous response.
+ ///
+ ///
+ /// Cursor for backward pagination - get items before this position. Use first_cursor from previous response.
+ ///
+ ///
+ /// Whether to include total count in response (expensive operation)
+ /// Default Value: false
+ ///
+ /// 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> ListBucketsAsResponseAsync(
+ int? limit = default,
+ string? after = default,
+ string? before = default,
+ bool? includeTotal = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.RotateBucketCredentials.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.RotateBucketCredentials.g.cs
new file mode 100644
index 0000000..c51ce98
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.RotateBucketCredentials.g.cs
@@ -0,0 +1,87 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IBucketsClient
+ {
+ ///
+ /// Rotate bucket credentials
+ /// Replace a bucket's stored credentials.
+ /// Only available for `access_key` buckets — `assume_role` buckets store no
+ /// credentials (manage access via the role's trust policy instead). The new
+ /// credentials are re-validated against the bucket's existing (immutable) identity
+ /// before they are persisted. The credentials version is bumped so cached storage clients rebuild.
+ /// Args:
+ /// bucket_id: The ID of the bucket to rotate credentials for.
+ /// params: The new bucket access credentials.
+ /// Returns:
+ /// Bucket: The updated bucket. Credentials are never returned.
+ ///
+ ///
+ /// The ID of the bucket to rotate credentials for
+ ///
+ ///
+ /// 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 RotateBucketCredentialsAsync(
+ global::System.Guid bucketId,
+
+ global::Mixedbread.BucketRotateCredentialsParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Rotate bucket credentials
+ /// Replace a bucket's stored credentials.
+ /// Only available for `access_key` buckets — `assume_role` buckets store no
+ /// credentials (manage access via the role's trust policy instead). The new
+ /// credentials are re-validated against the bucket's existing (immutable) identity
+ /// before they are persisted. The credentials version is bumped so cached storage clients rebuild.
+ /// Args:
+ /// bucket_id: The ID of the bucket to rotate credentials for.
+ /// params: The new bucket access credentials.
+ /// Returns:
+ /// Bucket: The updated bucket. Credentials are never returned.
+ ///
+ ///
+ /// The ID of the bucket to rotate credentials for
+ ///
+ ///
+ /// 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> RotateBucketCredentialsAsResponseAsync(
+ global::System.Guid bucketId,
+
+ global::Mixedbread.BucketRotateCredentialsParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Rotate bucket credentials
+ /// Replace a bucket's stored credentials.
+ /// Only available for `access_key` buckets — `assume_role` buckets store no
+ /// credentials (manage access via the role's trust policy instead). The new
+ /// credentials are re-validated against the bucket's existing (immutable) identity
+ /// before they are persisted. The credentials version is bumped so cached storage clients rebuild.
+ /// Args:
+ /// bucket_id: The ID of the bucket to rotate credentials for.
+ /// params: The new bucket access credentials.
+ /// Returns:
+ /// Bucket: The updated bucket. Credentials are never returned.
+ ///
+ ///
+ /// The ID of the bucket to rotate credentials for
+ ///
+ ///
+ /// New bucket access credentials
+ ///
+ /// 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 RotateBucketCredentialsAsync(
+ global::System.Guid bucketId,
+ global::Mixedbread.BucketAccessKeyCredentials credentials,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.g.cs
new file mode 100644
index 0000000..1fffbd8
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IBucketsClient.g.cs
@@ -0,0 +1,69 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public partial interface IBucketsClient : global::System.IDisposable
+ {
+ ///
+ /// The HttpClient instance.
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ /// The base URL for the API.
+ ///
+ public System.Uri? BaseUri { get; }
+
+
+ ///
+ /// The server options available for this client.
+ ///
+ public global::System.Collections.Generic.IReadOnlyList AvailableServers { get; }
+
+ ///
+ /// The currently selected server for this client, if any.
+ ///
+ public global::Mixedbread.AutoSDKServer? SelectedServer { get; set; }
+
+ ///
+ /// Selects one of the generated server options by id.
+ ///
+ public bool TrySelectServer(string serverId);
+
+ ///
+ /// Clears the currently selected server.
+ ///
+ public void ClearSelectedServer();
+
+ ///
+ /// The authorizations to use for the requests.
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ /// When false, successful responses are deserialized directly from the response stream for better performance.
+ /// Error responses are always read as strings regardless of this setting,
+ /// ensuring is populated.
+ ///
+ public bool ReadResponseAsString { get; set; }
+ ///
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ ///
+ public global::Mixedbread.AutoSDKClientOptions Options { get; }
+
+
+ ///
+ ///
+ ///
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.AuthorizeGoogleDriveIntegration.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.AuthorizeGoogleDriveIntegration.g.cs
new file mode 100644
index 0000000..308cb6b
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.AuthorizeGoogleDriveIntegration.g.cs
@@ -0,0 +1,36 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Authorize Google Drive integration
+ /// Start Google Drive OAuth for the current organization.
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ /// 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 AuthorizeGoogleDriveIntegrationAsync(
+ string? storeName = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Authorize Google Drive integration
+ /// Start Google Drive OAuth for the current organization.
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ /// 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 AuthorizeGoogleDriveIntegrationAsResponseAsync(
+ string? storeName = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.AuthorizeSlackIntegration.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.AuthorizeSlackIntegration.g.cs
new file mode 100644
index 0000000..1a5e690
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.AuthorizeSlackIntegration.g.cs
@@ -0,0 +1,46 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Authorize Slack integration
+ /// Start Slack OAuth for the current organization.
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ ///
+ /// Automatically sync all current and future channels
+ /// Default Value: false
+ ///
+ /// 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 AuthorizeSlackIntegrationAsync(
+ string? storeName = default,
+ bool? autoSyncAll = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Authorize Slack integration
+ /// Start Slack OAuth for the current organization.
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ ///
+ /// Automatically sync all current and future channels
+ /// Default Value: false
+ ///
+ /// 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 AuthorizeSlackIntegrationAsResponseAsync(
+ string? storeName = default,
+ bool? autoSyncAll = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ConnectSlackManual.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ConnectSlackManual.g.cs
new file mode 100644
index 0000000..989d0e3
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ConnectSlackManual.g.cs
@@ -0,0 +1,61 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Connect Slack with a customer-provided app
+ /// Connect a Slack workspace using a customer-created app's bot token and signing secret.
+ ///
+ ///
+ /// 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 ConnectSlackManualAsync(
+
+ global::Mixedbread.SlackManualConnectBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Connect Slack with a customer-provided app
+ /// Connect a Slack workspace using a customer-created app's bot token and signing secret.
+ ///
+ ///
+ /// 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> ConnectSlackManualAsResponseAsync(
+
+ global::Mixedbread.SlackManualConnectBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Connect Slack with a customer-provided app
+ /// Connect a Slack workspace using a customer-created app's bot token and signing secret.
+ ///
+ ///
+ /// Slack bot user OAuth token (xoxb-…)
+ ///
+ ///
+ /// Slack app signing secret
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ ///
+ /// Automatically sync all current and future channels
+ /// Default Value: false
+ ///
+ /// 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 ConnectSlackManualAsync(
+ string botToken,
+ string signingSecret,
+ string? storeName = default,
+ bool? autoSyncAll = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.DisconnectGoogleDriveInstallation.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.DisconnectGoogleDriveInstallation.g.cs
new file mode 100644
index 0000000..00108c8
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.DisconnectGoogleDriveInstallation.g.cs
@@ -0,0 +1,36 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Disconnect Google Drive
+ /// Disconnect a specific Google Drive installation from the current organization.
+ ///
+ ///
+ /// Google Drive installation 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 DisconnectGoogleDriveInstallationAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Disconnect Google Drive
+ /// Disconnect a specific Google Drive installation from the current organization.
+ ///
+ ///
+ /// Google Drive installation 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> DisconnectGoogleDriveInstallationAsResponseAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.DisconnectSlackInstallation.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.DisconnectSlackInstallation.g.cs
new file mode 100644
index 0000000..dc00651
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.DisconnectSlackInstallation.g.cs
@@ -0,0 +1,36 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Disconnect Slack
+ /// Disconnect a specific Slack installation from the current organization.
+ ///
+ ///
+ /// Slack installation 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 DisconnectSlackInstallationAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Disconnect Slack
+ /// Disconnect a specific Slack installation from the current organization.
+ ///
+ ///
+ /// Slack installation 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> DisconnectSlackInstallationAsResponseAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GetGoogleDriveFolderSelection.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GetGoogleDriveFolderSelection.g.cs
new file mode 100644
index 0000000..95786eb
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GetGoogleDriveFolderSelection.g.cs
@@ -0,0 +1,36 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// List Google Drive folders for store ingestion
+ /// List Google Drive folders and whether each is selected for store ingestion.
+ ///
+ ///
+ /// Google Drive installation 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 GetGoogleDriveFolderSelectionAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List Google Drive folders for store ingestion
+ /// List Google Drive folders and whether each is selected for store ingestion.
+ ///
+ ///
+ /// Google Drive installation 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> GetGoogleDriveFolderSelectionAsResponseAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GetSlackChannelSelection.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GetSlackChannelSelection.g.cs
new file mode 100644
index 0000000..da098ea
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GetSlackChannelSelection.g.cs
@@ -0,0 +1,36 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// List Slack channels for store ingestion
+ /// List public Slack channels and whether each channel is selected for store ingestion.
+ ///
+ ///
+ /// Slack installation 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 GetSlackChannelSelectionAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List Slack channels for store ingestion
+ /// List public Slack channels and whether each channel is selected for store ingestion.
+ ///
+ ///
+ /// Slack installation 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> GetSlackChannelSelectionAsResponseAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GetSlackManifest.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GetSlackManifest.g.cs
new file mode 100644
index 0000000..6638005
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GetSlackManifest.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Get Slack app manifest
+ /// Return the Slack app manifest pre-filled with this deployment's public URLs.
+ ///
+ /// 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 GetSlackManifestAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Slack app manifest
+ /// Return the Slack app manifest pre-filled with this deployment's public URLs.
+ ///
+ /// 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> GetSlackManifestAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GoogleDriveEvents.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GoogleDriveEvents.g.cs
new file mode 100644
index 0000000..926b76a
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GoogleDriveEvents.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Google Drive push webhook
+ /// Receive Google Drive push notifications and enqueue an incremental sync.
+ ///
+ /// 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 GoogleDriveEventsAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Google Drive push webhook
+ /// Receive Google Drive push notifications and enqueue an incremental sync.
+ ///
+ /// 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> GoogleDriveEventsAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GoogleDriveOauthCallback.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GoogleDriveOauthCallback.g.cs
new file mode 100644
index 0000000..c0c43db
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.GoogleDriveOauthCallback.g.cs
@@ -0,0 +1,52 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Google Drive OAuth callback
+ /// Complete Google Drive OAuth and persist the installation.
+ ///
+ ///
+ /// Google OAuth state
+ ///
+ ///
+ /// Google OAuth authorization code
+ ///
+ ///
+ /// Google OAuth error
+ ///
+ /// 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 GoogleDriveOauthCallbackAsync(
+ string state,
+ string? code = default,
+ string? error = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Google Drive OAuth callback
+ /// Complete Google Drive OAuth and persist the installation.
+ ///
+ ///
+ /// Google OAuth state
+ ///
+ ///
+ /// Google OAuth authorization code
+ ///
+ ///
+ /// Google OAuth error
+ ///
+ /// 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 GoogleDriveOauthCallbackAsResponseAsync(
+ string state,
+ string? code = default,
+ string? error = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.HandleSlackCommand.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.HandleSlackCommand.g.cs
new file mode 100644
index 0000000..fb4440a
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.HandleSlackCommand.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Slack slash command webhook
+ /// Receive signed Slack slash command requests.
+ ///
+ /// 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 HandleSlackCommandAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Slack slash command webhook
+ /// Receive signed Slack slash command requests.
+ ///
+ /// 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> HandleSlackCommandAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.HandleSlackEvent.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.HandleSlackEvent.g.cs
new file mode 100644
index 0000000..98457a3
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.HandleSlackEvent.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Slack events webhook
+ /// Receive signed Slack Events API requests.
+ ///
+ /// 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 HandleSlackEventAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Slack events webhook
+ /// Receive signed Slack Events API requests.
+ ///
+ /// 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> HandleSlackEventAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListDataSourceInstallations.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListDataSourceInstallations.g.cs
new file mode 100644
index 0000000..aab1bda
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListDataSourceInstallations.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// List connected data sources
+ /// List every connected data source across providers for the current organization.
+ ///
+ /// 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 ListDataSourceInstallationsAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List connected data sources
+ /// List every connected data source across providers for the current organization.
+ ///
+ /// 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> ListDataSourceInstallationsAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListGoogleDriveInstallations.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListGoogleDriveInstallations.g.cs
new file mode 100644
index 0000000..cf58aaa
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListGoogleDriveInstallations.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// List connected Google Drive accounts
+ /// List connected Google Drive accounts with their selected folder counts.
+ ///
+ /// 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 ListGoogleDriveInstallationsAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List connected Google Drive accounts
+ /// List connected Google Drive accounts with their selected folder counts.
+ ///
+ /// 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> ListGoogleDriveInstallationsAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListIntegrationInstallations.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListIntegrationInstallations.g.cs
new file mode 100644
index 0000000..d62fad1
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListIntegrationInstallations.g.cs
@@ -0,0 +1,64 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// List integration installations
+ /// List installed provider integrations for the current organization.
+ ///
+ ///
+ /// Maximum number of items to return per page (1-100)
+ /// Default Value: 20
+ ///
+ ///
+ /// Cursor for forward pagination - get items after this position. Use last_cursor from previous response.
+ ///
+ ///
+ /// Cursor for backward pagination - get items before this position. Use first_cursor from previous response.
+ ///
+ ///
+ /// Whether to include total count in response (expensive operation)
+ /// Default Value: false
+ ///
+ /// 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 ListIntegrationInstallationsAsync(
+ int? limit = default,
+ string? after = default,
+ string? before = default,
+ bool? includeTotal = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List integration installations
+ /// List installed provider integrations for the current organization.
+ ///
+ ///
+ /// Maximum number of items to return per page (1-100)
+ /// Default Value: 20
+ ///
+ ///
+ /// Cursor for forward pagination - get items after this position. Use last_cursor from previous response.
+ ///
+ ///
+ /// Cursor for backward pagination - get items before this position. Use first_cursor from previous response.
+ ///
+ ///
+ /// Whether to include total count in response (expensive operation)
+ /// Default Value: false
+ ///
+ /// 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> ListIntegrationInstallationsAsResponseAsync(
+ int? limit = default,
+ string? after = default,
+ string? before = default,
+ bool? includeTotal = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListIntegrationProviders.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListIntegrationProviders.g.cs
new file mode 100644
index 0000000..5579259
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListIntegrationProviders.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// List integration providers
+ /// List supported integration provider manifests.
+ ///
+ /// 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 ListIntegrationProvidersAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List integration providers
+ /// List supported integration provider manifests.
+ ///
+ /// 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> ListIntegrationProvidersAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListSlackInstallations.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListSlackInstallations.g.cs
new file mode 100644
index 0000000..0138296
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.ListSlackInstallations.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// List connected Slack workspaces
+ /// List connected Slack workspaces with their selected ingestion channel counts.
+ ///
+ /// 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 ListSlackInstallationsAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List connected Slack workspaces
+ /// List connected Slack workspaces with their selected ingestion channel counts.
+ ///
+ /// 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> ListSlackInstallationsAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.SlackOauthCallback.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.SlackOauthCallback.g.cs
new file mode 100644
index 0000000..6340491
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.SlackOauthCallback.g.cs
@@ -0,0 +1,52 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Slack OAuth callback
+ /// Complete Slack OAuth and persist the workspace installation.
+ ///
+ ///
+ /// Slack OAuth state
+ ///
+ ///
+ /// Slack OAuth authorization code
+ ///
+ ///
+ /// Slack OAuth error
+ ///
+ /// 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 SlackOauthCallbackAsync(
+ string state,
+ string? code = default,
+ string? error = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Slack OAuth callback
+ /// Complete Slack OAuth and persist the workspace installation.
+ ///
+ ///
+ /// Slack OAuth state
+ ///
+ ///
+ /// Slack OAuth authorization code
+ ///
+ ///
+ /// Slack OAuth error
+ ///
+ /// 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 SlackOauthCallbackAsResponseAsync(
+ string state,
+ string? code = default,
+ string? error = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.SyncGoogleDrive.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.SyncGoogleDrive.g.cs
new file mode 100644
index 0000000..9953956
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.SyncGoogleDrive.g.cs
@@ -0,0 +1,48 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Sync a Google Drive connector
+ /// Queue an incremental Google Drive change sync.
+ ///
+ ///
+ /// 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 SyncGoogleDriveAsync(
+
+ global::Mixedbread.GoogleDriveSyncParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Sync a Google Drive connector
+ /// Queue an incremental Google Drive change sync.
+ ///
+ ///
+ /// 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> SyncGoogleDriveAsResponseAsync(
+
+ global::Mixedbread.GoogleDriveSyncParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Sync a Google Drive connector
+ /// Queue an incremental Google Drive change sync.
+ ///
+ ///
+ /// Google Drive installation 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 SyncGoogleDriveAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.SyncSlackChannels.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.SyncSlackChannels.g.cs
new file mode 100644
index 0000000..ffb279e
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.SyncSlackChannels.g.cs
@@ -0,0 +1,57 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Sync selected Slack channels
+ /// Queue historical ingestion for selected Slack channels.
+ ///
+ ///
+ /// 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 SyncSlackChannelsAsync(
+
+ global::Mixedbread.SlackChannelSyncParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Sync selected Slack channels
+ /// Queue historical ingestion for selected Slack channels.
+ ///
+ ///
+ /// 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> SyncSlackChannelsAsResponseAsync(
+
+ global::Mixedbread.SlackChannelSyncParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Sync selected Slack channels
+ /// Queue historical ingestion for selected Slack channels.
+ ///
+ ///
+ /// Slack installation ID
+ ///
+ ///
+ /// Slack channel IDs to sync. Defaults to all selected channels.
+ ///
+ ///
+ /// Only retry Slack items that failed in the most recent import.
+ /// Default Value: false
+ ///
+ /// 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 SyncSlackChannelsAsync(
+ global::System.Guid installationId,
+ global::System.Collections.Generic.IList? channelIds = default,
+ bool? retryFailedOnly = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateGoogleDriveFolderSelection.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateGoogleDriveFolderSelection.g.cs
new file mode 100644
index 0000000..ab746d9
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateGoogleDriveFolderSelection.g.cs
@@ -0,0 +1,52 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Update Google Drive folders for store ingestion
+ /// Replace the Google Drive folders selected for ingestion into a store.
+ ///
+ ///
+ /// 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 UpdateGoogleDriveFolderSelectionAsync(
+
+ global::Mixedbread.GoogleDriveFolderSelectionUpdateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update Google Drive folders for store ingestion
+ /// Replace the Google Drive folders selected for ingestion into a store.
+ ///
+ ///
+ /// 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> UpdateGoogleDriveFolderSelectionAsResponseAsync(
+
+ global::Mixedbread.GoogleDriveFolderSelectionUpdateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update Google Drive folders for store ingestion
+ /// Replace the Google Drive folders selected for ingestion into a store.
+ ///
+ ///
+ /// Google Drive installation ID
+ ///
+ ///
+ /// Google Drive folder IDs to ingest into the store
+ ///
+ /// 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 UpdateGoogleDriveFolderSelectionAsync(
+ global::System.Guid installationId,
+ global::System.Collections.Generic.IList folderIds,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateGoogleDriveInstallationConfig.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateGoogleDriveInstallationConfig.g.cs
new file mode 100644
index 0000000..7b524b2
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateGoogleDriveInstallationConfig.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Update Google Drive data source config
+ /// Update a Google Drive data source config (sync entire Drive). Enabling syncs the whole Drive.
+ ///
+ ///
+ /// Google Drive installation 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 UpdateGoogleDriveInstallationConfigAsync(
+ global::System.Guid installationId,
+
+ global::Mixedbread.GoogleDriveInstallationConfigUpdateBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update Google Drive data source config
+ /// Update a Google Drive data source config (sync entire Drive). Enabling syncs the whole Drive.
+ ///
+ ///
+ /// Google Drive installation 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> UpdateGoogleDriveInstallationConfigAsResponseAsync(
+ global::System.Guid installationId,
+
+ global::Mixedbread.GoogleDriveInstallationConfigUpdateBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update Google Drive data source config
+ /// Update a Google Drive data source config (sync entire Drive). Enabling syncs the whole Drive.
+ ///
+ ///
+ /// Google Drive installation ID
+ ///
+ ///
+ /// Whether the entire Drive (all current and future files) is synced automatically
+ ///
+ /// 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 UpdateGoogleDriveInstallationConfigAsync(
+ global::System.Guid installationId,
+ bool autoSyncAll,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateSlackChannelSelection.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateSlackChannelSelection.g.cs
new file mode 100644
index 0000000..6a99082
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateSlackChannelSelection.g.cs
@@ -0,0 +1,52 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Update Slack channels for store ingestion
+ /// Replace the Slack channels selected for ingestion into a store.
+ ///
+ ///
+ /// 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 UpdateSlackChannelSelectionAsync(
+
+ global::Mixedbread.SlackChannelSelectionUpdateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update Slack channels for store ingestion
+ /// Replace the Slack channels selected for ingestion into a store.
+ ///
+ ///
+ /// 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> UpdateSlackChannelSelectionAsResponseAsync(
+
+ global::Mixedbread.SlackChannelSelectionUpdateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update Slack channels for store ingestion
+ /// Replace the Slack channels selected for ingestion into a store.
+ ///
+ ///
+ /// Slack installation ID
+ ///
+ ///
+ /// Slack channel IDs to ingest into the store
+ ///
+ /// 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 UpdateSlackChannelSelectionAsync(
+ global::System.Guid installationId,
+ global::System.Collections.Generic.IList channelIds,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateSlackInstallationConfig.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateSlackInstallationConfig.g.cs
new file mode 100644
index 0000000..c2a6240
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.UpdateSlackInstallationConfig.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial interface IIntegrationsClient
+ {
+ ///
+ /// Update Slack data source config
+ /// Update a Slack data source config (auto-sync-all). Enabling it syncs every channel.
+ ///
+ ///
+ /// Slack installation 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 UpdateSlackInstallationConfigAsync(
+ global::System.Guid installationId,
+
+ global::Mixedbread.SlackInstallationConfigUpdateBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update Slack data source config
+ /// Update a Slack data source config (auto-sync-all). Enabling it syncs every channel.
+ ///
+ ///
+ /// Slack installation 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> UpdateSlackInstallationConfigAsResponseAsync(
+ global::System.Guid installationId,
+
+ global::Mixedbread.SlackInstallationConfigUpdateBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update Slack data source config
+ /// Update a Slack data source config (auto-sync-all). Enabling it syncs every channel.
+ ///
+ ///
+ /// Slack installation ID
+ ///
+ ///
+ /// Whether all current and future Slack channels are synced automatically
+ ///
+ /// 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 UpdateSlackInstallationConfigAsync(
+ global::System.Guid installationId,
+ bool autoSyncAllChannels,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.g.cs
new file mode 100644
index 0000000..9eee238
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IIntegrationsClient.g.cs
@@ -0,0 +1,69 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public partial interface IIntegrationsClient : global::System.IDisposable
+ {
+ ///
+ /// The HttpClient instance.
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ /// The base URL for the API.
+ ///
+ public System.Uri? BaseUri { get; }
+
+
+ ///
+ /// The server options available for this client.
+ ///
+ public global::System.Collections.Generic.IReadOnlyList AvailableServers { get; }
+
+ ///
+ /// The currently selected server for this client, if any.
+ ///
+ public global::Mixedbread.AutoSDKServer? SelectedServer { get; set; }
+
+ ///
+ /// Selects one of the generated server options by id.
+ ///
+ public bool TrySelectServer(string serverId);
+
+ ///
+ /// Clears the currently selected server.
+ ///
+ public void ClearSelectedServer();
+
+ ///
+ /// The authorizations to use for the requests.
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ /// When false, successful responses are deserialized directly from the response stream for better performance.
+ /// Error responses are always read as strings regardless of this setting,
+ /// ensuring is populated.
+ ///
+ public bool ReadResponseAsString { get; set; }
+ ///
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ ///
+ public global::Mixedbread.AutoSDKClientOptions Options { get; }
+
+
+ ///
+ ///
+ ///
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs
index 6b6ddb8..6f21119 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IMixedbreadClient.g.cs
@@ -80,6 +80,11 @@ public partial interface IMixedbreadClient : global::System.IDisposable
///
public BillingClient Billing { get; }
+ ///
+ ///
+ ///
+ public BucketsClient Buckets { get; }
+
///
///
///
@@ -100,6 +105,11 @@ public partial interface IMixedbreadClient : global::System.IDisposable
///
public FilesClient Files { get; }
+ ///
+ ///
+ ///
+ public IntegrationsClient Integrations { get; }
+
///
///
///
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.GetStoreEventHistogram.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.GetStoreEventHistogram.g.cs
index effd21d..8692166 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.GetStoreEventHistogram.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.GetStoreEventHistogram.g.cs
@@ -71,7 +71,7 @@ public partial interface IStoresClient
/// Default Value: 7200
///
///
- /// Restrict the histogram to these event types. When omitted, includes search, agentic_search, and ingestion events.
+ /// Restrict the histogram to these event types. When omitted, includes search, agentic_search, grep, and ingestion events.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.GrepStoreChunks.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.GrepStoreChunks.g.cs
index e3edcaa..a5c13bb 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.GrepStoreChunks.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IStoresClient.GrepStoreChunks.g.cs
@@ -7,9 +7,9 @@ public partial interface IStoresClient
///
/// Match store chunks against a regular expression
/// Match store chunks against a regular expression.
- /// Unlike `/stores/search`, this performs exact text matching — no embeddings, no
- /// semantic similarity, no reranking. Use it to find chunks containing a specific
- /// token, identifier, error code, or literal phrase.
+ /// Unlike `/stores/search`, this runs your regex against the literal text of each
+ /// chunk. Use it to find chunks containing a specific token, identifier, error code,
+ /// or literal phrase.
/// grep targets a single store and does not support pagination; raise `top_k` to
/// retrieve more matches.
/// Args:
@@ -39,9 +39,9 @@ public partial interface IStoresClient
///
/// Match store chunks against a regular expression
/// Match store chunks against a regular expression.
- /// Unlike `/stores/search`, this performs exact text matching — no embeddings, no
- /// semantic similarity, no reranking. Use it to find chunks containing a specific
- /// token, identifier, error code, or literal phrase.
+ /// Unlike `/stores/search`, this runs your regex against the literal text of each
+ /// chunk. Use it to find chunks containing a specific token, identifier, error code,
+ /// or literal phrase.
/// grep targets a single store and does not support pagination; raise `top_k` to
/// retrieve more matches.
/// Args:
@@ -71,9 +71,9 @@ public partial interface IStoresClient
///
/// Match store chunks against a regular expression
/// Match store chunks against a regular expression.
- /// Unlike `/stores/search`, this performs exact text matching — no embeddings, no
- /// semantic similarity, no reranking. Use it to find chunks containing a specific
- /// token, identifier, error code, or literal phrase.
+ /// Unlike `/stores/search`, this runs your regex against the literal text of each
+ /// chunk. Use it to find chunks containing a specific token, identifier, error code,
+ /// or literal phrase.
/// grep targets a single store and does not support pagination; raise `top_k` to
/// retrieve more matches.
/// Args:
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.AuthorizeGoogleDriveIntegration.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.AuthorizeGoogleDriveIntegration.g.cs
new file mode 100644
index 0000000..d969281
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.AuthorizeGoogleDriveIntegration.g.cs
@@ -0,0 +1,509 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_AuthorizeGoogleDriveIntegrationServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_AuthorizeGoogleDriveIntegrationSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_AuthorizeGoogleDriveIntegrationSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_AuthorizeGoogleDriveIntegrationSecurityRequirement0,
+ };
+ partial void PrepareAuthorizeGoogleDriveIntegrationArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string? storeName);
+ partial void PrepareAuthorizeGoogleDriveIntegrationRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string? storeName);
+ partial void ProcessAuthorizeGoogleDriveIntegrationResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ ///
+ /// Authorize Google Drive integration
+ /// Start Google Drive OAuth for the current organization.
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ /// 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 AuthorizeGoogleDriveIntegrationAsync(
+ string? storeName = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await AuthorizeGoogleDriveIntegrationAsResponseAsync(
+ storeName: storeName,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Authorize Google Drive integration
+ /// Start Google Drive OAuth for the current organization.
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ /// 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 AuthorizeGoogleDriveIntegrationAsResponseAsync(
+ string? storeName = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareAuthorizeGoogleDriveIntegrationArguments(
+ httpClient: HttpClient,
+ storeName: ref storeName);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_AuthorizeGoogleDriveIntegrationSecurityRequirements,
+ operationName: "AuthorizeGoogleDriveIntegrationAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/google_drive/oauth/authorize",
+ baseUri: ResolveBaseUri(
+ servers: s_AuthorizeGoogleDriveIntegrationServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ __pathBuilder
+ .AddOptionalParameter("store_name", storeName)
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareAuthorizeGoogleDriveIntegrationRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ storeName: storeName);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeGoogleDriveIntegration",
+ methodName: "AuthorizeGoogleDriveIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeGoogleDriveIntegration",
+ methodName: "AuthorizeGoogleDriveIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeGoogleDriveIntegration",
+ methodName: "AuthorizeGoogleDriveIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessAuthorizeGoogleDriveIntegrationResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeGoogleDriveIntegration",
+ methodName: "AuthorizeGoogleDriveIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeGoogleDriveIntegration",
+ methodName: "AuthorizeGoogleDriveIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Redirect to Google OAuth
+ if ((int)__response.StatusCode == 307)
+ {
+ string? __content_307 = null;
+ global::System.Exception? __exception_307 = null;
+ string? __value_307 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_307 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ }
+ else
+ {
+ __content_307 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_307 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_307 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_307,
+ responseBody: __content_307,
+ responseObject: __value_307,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.AuthorizeSlackIntegration.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.AuthorizeSlackIntegration.g.cs
new file mode 100644
index 0000000..f6d8876
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.AuthorizeSlackIntegration.g.cs
@@ -0,0 +1,525 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_AuthorizeSlackIntegrationServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_AuthorizeSlackIntegrationSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_AuthorizeSlackIntegrationSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_AuthorizeSlackIntegrationSecurityRequirement0,
+ };
+ partial void PrepareAuthorizeSlackIntegrationArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string? storeName,
+ ref bool? autoSyncAll);
+ partial void PrepareAuthorizeSlackIntegrationRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string? storeName,
+ bool? autoSyncAll);
+ partial void ProcessAuthorizeSlackIntegrationResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ ///
+ /// Authorize Slack integration
+ /// Start Slack OAuth for the current organization.
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ ///
+ /// Automatically sync all current and future channels
+ /// Default Value: false
+ ///
+ /// 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 AuthorizeSlackIntegrationAsync(
+ string? storeName = default,
+ bool? autoSyncAll = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await AuthorizeSlackIntegrationAsResponseAsync(
+ storeName: storeName,
+ autoSyncAll: autoSyncAll,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Authorize Slack integration
+ /// Start Slack OAuth for the current organization.
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ ///
+ /// Automatically sync all current and future channels
+ /// Default Value: false
+ ///
+ /// 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 AuthorizeSlackIntegrationAsResponseAsync(
+ string? storeName = default,
+ bool? autoSyncAll = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareAuthorizeSlackIntegrationArguments(
+ httpClient: HttpClient,
+ storeName: ref storeName,
+ autoSyncAll: ref autoSyncAll);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_AuthorizeSlackIntegrationSecurityRequirements,
+ operationName: "AuthorizeSlackIntegrationAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/oauth/authorize",
+ baseUri: ResolveBaseUri(
+ servers: s_AuthorizeSlackIntegrationServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ __pathBuilder
+ .AddOptionalParameter("store_name", storeName)
+ .AddOptionalParameter("auto_sync_all", autoSyncAll?.ToString().ToLowerInvariant())
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareAuthorizeSlackIntegrationRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ storeName: storeName,
+ autoSyncAll: autoSyncAll);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeSlackIntegration",
+ methodName: "AuthorizeSlackIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeSlackIntegration",
+ methodName: "AuthorizeSlackIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeSlackIntegration",
+ methodName: "AuthorizeSlackIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessAuthorizeSlackIntegrationResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeSlackIntegration",
+ methodName: "AuthorizeSlackIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AuthorizeSlackIntegration",
+ methodName: "AuthorizeSlackIntegrationAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/authorize\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Redirect to Slack OAuth
+ if ((int)__response.StatusCode == 307)
+ {
+ string? __content_307 = null;
+ global::System.Exception? __exception_307 = null;
+ string? __value_307 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_307 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ }
+ else
+ {
+ __content_307 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_307 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_307 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_307,
+ responseBody: __content_307,
+ responseObject: __value_307,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ConnectSlackManual.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ConnectSlackManual.g.cs
new file mode 100644
index 0000000..5b9d771
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ConnectSlackManual.g.cs
@@ -0,0 +1,540 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_ConnectSlackManualServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_ConnectSlackManualSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_ConnectSlackManualSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_ConnectSlackManualSecurityRequirement0,
+ };
+ partial void PrepareConnectSlackManualArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Mixedbread.SlackManualConnectBody request);
+ partial void PrepareConnectSlackManualRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Mixedbread.SlackManualConnectBody request);
+ partial void ProcessConnectSlackManualResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessConnectSlackManualResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Connect Slack with a customer-provided app
+ /// Connect a Slack workspace using a customer-created app's bot token and signing secret.
+ ///
+ ///
+ /// 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 ConnectSlackManualAsync(
+
+ global::Mixedbread.SlackManualConnectBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ConnectSlackManualAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Connect Slack with a customer-provided app
+ /// Connect a Slack workspace using a customer-created app's bot token and signing secret.
+ ///
+ ///
+ /// 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> ConnectSlackManualAsResponseAsync(
+
+ global::Mixedbread.SlackManualConnectBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareConnectSlackManualArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ConnectSlackManualSecurityRequirements,
+ operationName: "ConnectSlackManualAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/connect",
+ baseUri: ResolveBaseUri(
+ servers: s_ConnectSlackManualServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareConnectSlackManualRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConnectSlackManual",
+ methodName: "ConnectSlackManualAsync",
+ pathTemplate: "\"/v1/integrations/slack/connect\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConnectSlackManual",
+ methodName: "ConnectSlackManualAsync",
+ pathTemplate: "\"/v1/integrations/slack/connect\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConnectSlackManual",
+ methodName: "ConnectSlackManualAsync",
+ pathTemplate: "\"/v1/integrations/slack/connect\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessConnectSlackManualResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConnectSlackManual",
+ methodName: "ConnectSlackManualAsync",
+ pathTemplate: "\"/v1/integrations/slack/connect\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConnectSlackManual",
+ methodName: "ConnectSlackManualAsync",
+ pathTemplate: "\"/v1/integrations/slack/connect\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessConnectSlackManualResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.IntegrationInstallationResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.IntegrationInstallationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Connect Slack with a customer-provided app
+ /// Connect a Slack workspace using a customer-created app's bot token and signing secret.
+ ///
+ ///
+ /// Slack bot user OAuth token (xoxb-…)
+ ///
+ ///
+ /// Slack app signing secret
+ ///
+ ///
+ /// Optional ingestion store name
+ ///
+ ///
+ /// Automatically sync all current and future channels
+ /// Default Value: false
+ ///
+ /// 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 ConnectSlackManualAsync(
+ string botToken,
+ string signingSecret,
+ string? storeName = default,
+ bool? autoSyncAll = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Mixedbread.SlackManualConnectBody
+ {
+ BotToken = botToken,
+ SigningSecret = signingSecret,
+ StoreName = storeName,
+ AutoSyncAll = autoSyncAll,
+ };
+
+ return await ConnectSlackManualAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.DisconnectGoogleDriveInstallation.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.DisconnectGoogleDriveInstallation.g.cs
new file mode 100644
index 0000000..ffd3a5f
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.DisconnectGoogleDriveInstallation.g.cs
@@ -0,0 +1,492 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_DisconnectGoogleDriveInstallationServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_DisconnectGoogleDriveInstallationSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_DisconnectGoogleDriveInstallationSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_DisconnectGoogleDriveInstallationSecurityRequirement0,
+ };
+ partial void PrepareDisconnectGoogleDriveInstallationArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid installationId);
+ partial void PrepareDisconnectGoogleDriveInstallationRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid installationId);
+ partial void ProcessDisconnectGoogleDriveInstallationResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessDisconnectGoogleDriveInstallationResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Disconnect Google Drive
+ /// Disconnect a specific Google Drive installation from the current organization.
+ ///
+ ///
+ /// Google Drive installation 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 DisconnectGoogleDriveInstallationAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DisconnectGoogleDriveInstallationAsResponseAsync(
+ installationId: installationId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Disconnect Google Drive
+ /// Disconnect a specific Google Drive installation from the current organization.
+ ///
+ ///
+ /// Google Drive installation 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> DisconnectGoogleDriveInstallationAsResponseAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareDisconnectGoogleDriveInstallationArguments(
+ httpClient: HttpClient,
+ installationId: ref installationId);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_DisconnectGoogleDriveInstallationSecurityRequirements,
+ operationName: "DisconnectGoogleDriveInstallationAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: $"/v1/integrations/google_drive/installations/{installationId}",
+ baseUri: ResolveBaseUri(
+ servers: s_DisconnectGoogleDriveInstallationServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Delete,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareDisconnectGoogleDriveInstallationRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ installationId: installationId!);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectGoogleDriveInstallation",
+ methodName: "DisconnectGoogleDriveInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectGoogleDriveInstallation",
+ methodName: "DisconnectGoogleDriveInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectGoogleDriveInstallation",
+ methodName: "DisconnectGoogleDriveInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessDisconnectGoogleDriveInstallationResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectGoogleDriveInstallation",
+ methodName: "DisconnectGoogleDriveInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectGoogleDriveInstallation",
+ methodName: "DisconnectGoogleDriveInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessDisconnectGoogleDriveInstallationResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.IntegrationInstallationResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.IntegrationInstallationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.DisconnectSlackInstallation.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.DisconnectSlackInstallation.g.cs
new file mode 100644
index 0000000..30e9616
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.DisconnectSlackInstallation.g.cs
@@ -0,0 +1,492 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_DisconnectSlackInstallationServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_DisconnectSlackInstallationSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_DisconnectSlackInstallationSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_DisconnectSlackInstallationSecurityRequirement0,
+ };
+ partial void PrepareDisconnectSlackInstallationArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid installationId);
+ partial void PrepareDisconnectSlackInstallationRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid installationId);
+ partial void ProcessDisconnectSlackInstallationResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessDisconnectSlackInstallationResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Disconnect Slack
+ /// Disconnect a specific Slack installation from the current organization.
+ ///
+ ///
+ /// Slack installation 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 DisconnectSlackInstallationAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DisconnectSlackInstallationAsResponseAsync(
+ installationId: installationId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Disconnect Slack
+ /// Disconnect a specific Slack installation from the current organization.
+ ///
+ ///
+ /// Slack installation 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> DisconnectSlackInstallationAsResponseAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareDisconnectSlackInstallationArguments(
+ httpClient: HttpClient,
+ installationId: ref installationId);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_DisconnectSlackInstallationSecurityRequirements,
+ operationName: "DisconnectSlackInstallationAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: $"/v1/integrations/slack/installations/{installationId}",
+ baseUri: ResolveBaseUri(
+ servers: s_DisconnectSlackInstallationServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Delete,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareDisconnectSlackInstallationRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ installationId: installationId!);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectSlackInstallation",
+ methodName: "DisconnectSlackInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectSlackInstallation",
+ methodName: "DisconnectSlackInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectSlackInstallation",
+ methodName: "DisconnectSlackInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessDisconnectSlackInstallationResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectSlackInstallation",
+ methodName: "DisconnectSlackInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DisconnectSlackInstallation",
+ methodName: "DisconnectSlackInstallationAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessDisconnectSlackInstallationResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.IntegrationInstallationResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.IntegrationInstallationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GetGoogleDriveFolderSelection.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GetGoogleDriveFolderSelection.g.cs
new file mode 100644
index 0000000..a209962
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GetGoogleDriveFolderSelection.g.cs
@@ -0,0 +1,495 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_GetGoogleDriveFolderSelectionServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_GetGoogleDriveFolderSelectionSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_GetGoogleDriveFolderSelectionSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_GetGoogleDriveFolderSelectionSecurityRequirement0,
+ };
+ partial void PrepareGetGoogleDriveFolderSelectionArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid installationId);
+ partial void PrepareGetGoogleDriveFolderSelectionRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid installationId);
+ partial void ProcessGetGoogleDriveFolderSelectionResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetGoogleDriveFolderSelectionResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List Google Drive folders for store ingestion
+ /// List Google Drive folders and whether each is selected for store ingestion.
+ ///
+ ///
+ /// Google Drive installation 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 GetGoogleDriveFolderSelectionAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetGoogleDriveFolderSelectionAsResponseAsync(
+ installationId: installationId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List Google Drive folders for store ingestion
+ /// List Google Drive folders and whether each is selected for store ingestion.
+ ///
+ ///
+ /// Google Drive installation 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> GetGoogleDriveFolderSelectionAsResponseAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetGoogleDriveFolderSelectionArguments(
+ httpClient: HttpClient,
+ installationId: ref installationId);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetGoogleDriveFolderSelectionSecurityRequirements,
+ operationName: "GetGoogleDriveFolderSelectionAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/google_drive/folders",
+ baseUri: ResolveBaseUri(
+ servers: s_GetGoogleDriveFolderSelectionServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ __pathBuilder
+ .AddRequiredParameter("installation_id", installationId.ToString()!)
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetGoogleDriveFolderSelectionRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ installationId: installationId!);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetGoogleDriveFolderSelection",
+ methodName: "GetGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetGoogleDriveFolderSelection",
+ methodName: "GetGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetGoogleDriveFolderSelection",
+ methodName: "GetGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetGoogleDriveFolderSelectionResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetGoogleDriveFolderSelection",
+ methodName: "GetGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetGoogleDriveFolderSelection",
+ methodName: "GetGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetGoogleDriveFolderSelectionResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.GoogleDriveFolderSelectionResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.GoogleDriveFolderSelectionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GetSlackChannelSelection.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GetSlackChannelSelection.g.cs
new file mode 100644
index 0000000..bd2deb6
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GetSlackChannelSelection.g.cs
@@ -0,0 +1,495 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_GetSlackChannelSelectionServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_GetSlackChannelSelectionSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_GetSlackChannelSelectionSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_GetSlackChannelSelectionSecurityRequirement0,
+ };
+ partial void PrepareGetSlackChannelSelectionArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid installationId);
+ partial void PrepareGetSlackChannelSelectionRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid installationId);
+ partial void ProcessGetSlackChannelSelectionResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetSlackChannelSelectionResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List Slack channels for store ingestion
+ /// List public Slack channels and whether each channel is selected for store ingestion.
+ ///
+ ///
+ /// Slack installation 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 GetSlackChannelSelectionAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetSlackChannelSelectionAsResponseAsync(
+ installationId: installationId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List Slack channels for store ingestion
+ /// List public Slack channels and whether each channel is selected for store ingestion.
+ ///
+ ///
+ /// Slack installation 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> GetSlackChannelSelectionAsResponseAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetSlackChannelSelectionArguments(
+ httpClient: HttpClient,
+ installationId: ref installationId);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetSlackChannelSelectionSecurityRequirements,
+ operationName: "GetSlackChannelSelectionAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/channels",
+ baseUri: ResolveBaseUri(
+ servers: s_GetSlackChannelSelectionServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ __pathBuilder
+ .AddRequiredParameter("installation_id", installationId.ToString()!)
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetSlackChannelSelectionRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ installationId: installationId!);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackChannelSelection",
+ methodName: "GetSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackChannelSelection",
+ methodName: "GetSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackChannelSelection",
+ methodName: "GetSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetSlackChannelSelectionResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackChannelSelection",
+ methodName: "GetSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackChannelSelection",
+ methodName: "GetSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetSlackChannelSelectionResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.SlackChannelSelectionResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.SlackChannelSelectionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GetSlackManifest.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GetSlackManifest.g.cs
new file mode 100644
index 0000000..b6890f7
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GetSlackManifest.g.cs
@@ -0,0 +1,442 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_GetSlackManifestServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_GetSlackManifestSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_GetSlackManifestSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_GetSlackManifestSecurityRequirement0,
+ };
+ partial void PrepareGetSlackManifestArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareGetSlackManifestRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessGetSlackManifestResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetSlackManifestResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get Slack app manifest
+ /// Return the Slack app manifest pre-filled with this deployment's public URLs.
+ ///
+ /// 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 GetSlackManifestAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetSlackManifestAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Slack app manifest
+ /// Return the Slack app manifest pre-filled with this deployment's public URLs.
+ ///
+ /// 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> GetSlackManifestAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetSlackManifestArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetSlackManifestSecurityRequirements,
+ operationName: "GetSlackManifestAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/manifest",
+ baseUri: ResolveBaseUri(
+ servers: s_GetSlackManifestServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetSlackManifestRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackManifest",
+ methodName: "GetSlackManifestAsync",
+ pathTemplate: "\"/v1/integrations/slack/manifest\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackManifest",
+ methodName: "GetSlackManifestAsync",
+ pathTemplate: "\"/v1/integrations/slack/manifest\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackManifest",
+ methodName: "GetSlackManifestAsync",
+ pathTemplate: "\"/v1/integrations/slack/manifest\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetSlackManifestResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackManifest",
+ methodName: "GetSlackManifestAsync",
+ pathTemplate: "\"/v1/integrations/slack/manifest\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSlackManifest",
+ methodName: "GetSlackManifestAsync",
+ pathTemplate: "\"/v1/integrations/slack/manifest\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetSlackManifestResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.SlackManifestResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.SlackManifestResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GoogleDriveEvents.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GoogleDriveEvents.g.cs
new file mode 100644
index 0000000..8a4e6ec
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GoogleDriveEvents.g.cs
@@ -0,0 +1,438 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_GoogleDriveEventsServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_GoogleDriveEventsSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_GoogleDriveEventsSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_GoogleDriveEventsSecurityRequirement0,
+ };
+ partial void PrepareGoogleDriveEventsArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareGoogleDriveEventsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessGoogleDriveEventsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGoogleDriveEventsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Google Drive push webhook
+ /// Receive Google Drive push notifications and enqueue an incremental sync.
+ ///
+ /// 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 GoogleDriveEventsAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GoogleDriveEventsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Google Drive push webhook
+ /// Receive Google Drive push notifications and enqueue an incremental sync.
+ ///
+ /// 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> GoogleDriveEventsAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGoogleDriveEventsArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GoogleDriveEventsSecurityRequirements,
+ operationName: "GoogleDriveEventsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/google_drive/events",
+ baseUri: ResolveBaseUri(
+ servers: s_GoogleDriveEventsServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGoogleDriveEventsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveEvents",
+ methodName: "GoogleDriveEventsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveEvents",
+ methodName: "GoogleDriveEventsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveEvents",
+ methodName: "GoogleDriveEventsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGoogleDriveEventsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveEvents",
+ methodName: "GoogleDriveEventsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveEvents",
+ methodName: "GoogleDriveEventsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGoogleDriveEventsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GoogleDriveOauthCallback.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GoogleDriveOauthCallback.g.cs
new file mode 100644
index 0000000..6e0c12c
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.GoogleDriveOauthCallback.g.cs
@@ -0,0 +1,537 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_GoogleDriveOauthCallbackServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_GoogleDriveOauthCallbackSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_GoogleDriveOauthCallbackSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_GoogleDriveOauthCallbackSecurityRequirement0,
+ };
+ partial void PrepareGoogleDriveOauthCallbackArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string state,
+ ref string? code,
+ ref string? error);
+ partial void PrepareGoogleDriveOauthCallbackRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string state,
+ string? code,
+ string? error);
+ partial void ProcessGoogleDriveOauthCallbackResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ ///
+ /// Google Drive OAuth callback
+ /// Complete Google Drive OAuth and persist the installation.
+ ///
+ ///
+ /// Google OAuth state
+ ///
+ ///
+ /// Google OAuth authorization code
+ ///
+ ///
+ /// Google OAuth error
+ ///
+ /// 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 GoogleDriveOauthCallbackAsync(
+ string state,
+ string? code = default,
+ string? error = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await GoogleDriveOauthCallbackAsResponseAsync(
+ state: state,
+ code: code,
+ error: error,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Google Drive OAuth callback
+ /// Complete Google Drive OAuth and persist the installation.
+ ///
+ ///
+ /// Google OAuth state
+ ///
+ ///
+ /// Google OAuth authorization code
+ ///
+ ///
+ /// Google OAuth error
+ ///
+ /// 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 GoogleDriveOauthCallbackAsResponseAsync(
+ string state,
+ string? code = default,
+ string? error = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGoogleDriveOauthCallbackArguments(
+ httpClient: HttpClient,
+ state: ref state,
+ code: ref code,
+ error: ref error);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GoogleDriveOauthCallbackSecurityRequirements,
+ operationName: "GoogleDriveOauthCallbackAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/google_drive/oauth/callback",
+ baseUri: ResolveBaseUri(
+ servers: s_GoogleDriveOauthCallbackServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ __pathBuilder
+ .AddRequiredParameter("state", state)
+ .AddOptionalParameter("code", code)
+ .AddOptionalParameter("error", error)
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGoogleDriveOauthCallbackRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ state: state!,
+ code: code,
+ error: error);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveOauthCallback",
+ methodName: "GoogleDriveOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveOauthCallback",
+ methodName: "GoogleDriveOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveOauthCallback",
+ methodName: "GoogleDriveOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGoogleDriveOauthCallbackResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveOauthCallback",
+ methodName: "GoogleDriveOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GoogleDriveOauthCallback",
+ methodName: "GoogleDriveOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Redirect after Google Drive installation
+ if ((int)__response.StatusCode == 307)
+ {
+ string? __content_307 = null;
+ global::System.Exception? __exception_307 = null;
+ string? __value_307 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_307 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ }
+ else
+ {
+ __content_307 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_307 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_307 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_307,
+ responseBody: __content_307,
+ responseObject: __value_307,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.HandleSlackCommand.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.HandleSlackCommand.g.cs
new file mode 100644
index 0000000..3885ac6
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.HandleSlackCommand.g.cs
@@ -0,0 +1,438 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_HandleSlackCommandServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_HandleSlackCommandSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_HandleSlackCommandSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_HandleSlackCommandSecurityRequirement0,
+ };
+ partial void PrepareHandleSlackCommandArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareHandleSlackCommandRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessHandleSlackCommandResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessHandleSlackCommandResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Slack slash command webhook
+ /// Receive signed Slack slash command requests.
+ ///
+ /// 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 HandleSlackCommandAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await HandleSlackCommandAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Slack slash command webhook
+ /// Receive signed Slack slash command requests.
+ ///
+ /// 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> HandleSlackCommandAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareHandleSlackCommandArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_HandleSlackCommandSecurityRequirements,
+ operationName: "HandleSlackCommandAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/commands",
+ baseUri: ResolveBaseUri(
+ servers: s_HandleSlackCommandServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareHandleSlackCommandRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackCommand",
+ methodName: "HandleSlackCommandAsync",
+ pathTemplate: "\"/v1/integrations/slack/commands\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackCommand",
+ methodName: "HandleSlackCommandAsync",
+ pathTemplate: "\"/v1/integrations/slack/commands\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackCommand",
+ methodName: "HandleSlackCommandAsync",
+ pathTemplate: "\"/v1/integrations/slack/commands\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessHandleSlackCommandResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackCommand",
+ methodName: "HandleSlackCommandAsync",
+ pathTemplate: "\"/v1/integrations/slack/commands\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackCommand",
+ methodName: "HandleSlackCommandAsync",
+ pathTemplate: "\"/v1/integrations/slack/commands\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessHandleSlackCommandResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.HandleSlackEvent.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.HandleSlackEvent.g.cs
new file mode 100644
index 0000000..6e65756
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.HandleSlackEvent.g.cs
@@ -0,0 +1,438 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_HandleSlackEventServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_HandleSlackEventSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_HandleSlackEventSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_HandleSlackEventSecurityRequirement0,
+ };
+ partial void PrepareHandleSlackEventArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareHandleSlackEventRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessHandleSlackEventResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessHandleSlackEventResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Slack events webhook
+ /// Receive signed Slack Events API requests.
+ ///
+ /// 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 HandleSlackEventAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await HandleSlackEventAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Slack events webhook
+ /// Receive signed Slack Events API requests.
+ ///
+ /// 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> HandleSlackEventAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareHandleSlackEventArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_HandleSlackEventSecurityRequirements,
+ operationName: "HandleSlackEventAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/events",
+ baseUri: ResolveBaseUri(
+ servers: s_HandleSlackEventServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareHandleSlackEventRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackEvent",
+ methodName: "HandleSlackEventAsync",
+ pathTemplate: "\"/v1/integrations/slack/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackEvent",
+ methodName: "HandleSlackEventAsync",
+ pathTemplate: "\"/v1/integrations/slack/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackEvent",
+ methodName: "HandleSlackEventAsync",
+ pathTemplate: "\"/v1/integrations/slack/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessHandleSlackEventResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackEvent",
+ methodName: "HandleSlackEventAsync",
+ pathTemplate: "\"/v1/integrations/slack/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "HandleSlackEvent",
+ methodName: "HandleSlackEventAsync",
+ pathTemplate: "\"/v1/integrations/slack/events\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessHandleSlackEventResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListDataSourceInstallations.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListDataSourceInstallations.g.cs
new file mode 100644
index 0000000..97b596d
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListDataSourceInstallations.g.cs
@@ -0,0 +1,442 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_ListDataSourceInstallationsServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_ListDataSourceInstallationsSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_ListDataSourceInstallationsSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_ListDataSourceInstallationsSecurityRequirement0,
+ };
+ partial void PrepareListDataSourceInstallationsArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareListDataSourceInstallationsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessListDataSourceInstallationsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListDataSourceInstallationsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List connected data sources
+ /// List every connected data source across providers for the current organization.
+ ///
+ /// 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 ListDataSourceInstallationsAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListDataSourceInstallationsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List connected data sources
+ /// List every connected data source across providers for the current organization.
+ ///
+ /// 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> ListDataSourceInstallationsAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListDataSourceInstallationsArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListDataSourceInstallationsSecurityRequirements,
+ operationName: "ListDataSourceInstallationsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/data-sources",
+ baseUri: ResolveBaseUri(
+ servers: s_ListDataSourceInstallationsServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListDataSourceInstallationsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListDataSourceInstallations",
+ methodName: "ListDataSourceInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/data-sources\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListDataSourceInstallations",
+ methodName: "ListDataSourceInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/data-sources\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListDataSourceInstallations",
+ methodName: "ListDataSourceInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/data-sources\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListDataSourceInstallationsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListDataSourceInstallations",
+ methodName: "ListDataSourceInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/data-sources\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListDataSourceInstallations",
+ methodName: "ListDataSourceInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/data-sources\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListDataSourceInstallationsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.DataSourceInstallationListResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.DataSourceInstallationListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListGoogleDriveInstallations.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListGoogleDriveInstallations.g.cs
new file mode 100644
index 0000000..697ca2a
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListGoogleDriveInstallations.g.cs
@@ -0,0 +1,442 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_ListGoogleDriveInstallationsServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_ListGoogleDriveInstallationsSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_ListGoogleDriveInstallationsSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_ListGoogleDriveInstallationsSecurityRequirement0,
+ };
+ partial void PrepareListGoogleDriveInstallationsArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareListGoogleDriveInstallationsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessListGoogleDriveInstallationsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListGoogleDriveInstallationsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List connected Google Drive accounts
+ /// List connected Google Drive accounts with their selected folder counts.
+ ///
+ /// 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 ListGoogleDriveInstallationsAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListGoogleDriveInstallationsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List connected Google Drive accounts
+ /// List connected Google Drive accounts with their selected folder counts.
+ ///
+ /// 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> ListGoogleDriveInstallationsAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListGoogleDriveInstallationsArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListGoogleDriveInstallationsSecurityRequirements,
+ operationName: "ListGoogleDriveInstallationsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/google_drive/installations",
+ baseUri: ResolveBaseUri(
+ servers: s_ListGoogleDriveInstallationsServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListGoogleDriveInstallationsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListGoogleDriveInstallations",
+ methodName: "ListGoogleDriveInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListGoogleDriveInstallations",
+ methodName: "ListGoogleDriveInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListGoogleDriveInstallations",
+ methodName: "ListGoogleDriveInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListGoogleDriveInstallationsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListGoogleDriveInstallations",
+ methodName: "ListGoogleDriveInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListGoogleDriveInstallations",
+ methodName: "ListGoogleDriveInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListGoogleDriveInstallationsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.GoogleDriveInstallationOverviewListResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.GoogleDriveInstallationOverviewListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListIntegrationInstallations.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListIntegrationInstallations.g.cs
new file mode 100644
index 0000000..f034d8a
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListIntegrationInstallations.g.cs
@@ -0,0 +1,541 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_ListIntegrationInstallationsServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_ListIntegrationInstallationsSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_ListIntegrationInstallationsSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_ListIntegrationInstallationsSecurityRequirement0,
+ };
+ partial void PrepareListIntegrationInstallationsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? limit,
+ ref string? after,
+ ref string? before,
+ ref bool? includeTotal);
+ partial void PrepareListIntegrationInstallationsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? limit,
+ string? after,
+ string? before,
+ bool? includeTotal);
+ partial void ProcessListIntegrationInstallationsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListIntegrationInstallationsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List integration installations
+ /// List installed provider integrations for the current organization.
+ ///
+ ///
+ /// Maximum number of items to return per page (1-100)
+ /// Default Value: 20
+ ///
+ ///
+ /// Cursor for forward pagination - get items after this position. Use last_cursor from previous response.
+ ///
+ ///
+ /// Cursor for backward pagination - get items before this position. Use first_cursor from previous response.
+ ///
+ ///
+ /// Whether to include total count in response (expensive operation)
+ /// Default Value: false
+ ///
+ /// 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 ListIntegrationInstallationsAsync(
+ int? limit = default,
+ string? after = default,
+ string? before = default,
+ bool? includeTotal = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListIntegrationInstallationsAsResponseAsync(
+ limit: limit,
+ after: after,
+ before: before,
+ includeTotal: includeTotal,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List integration installations
+ /// List installed provider integrations for the current organization.
+ ///
+ ///
+ /// Maximum number of items to return per page (1-100)
+ /// Default Value: 20
+ ///
+ ///
+ /// Cursor for forward pagination - get items after this position. Use last_cursor from previous response.
+ ///
+ ///
+ /// Cursor for backward pagination - get items before this position. Use first_cursor from previous response.
+ ///
+ ///
+ /// Whether to include total count in response (expensive operation)
+ /// Default Value: false
+ ///
+ /// 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> ListIntegrationInstallationsAsResponseAsync(
+ int? limit = default,
+ string? after = default,
+ string? before = default,
+ bool? includeTotal = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListIntegrationInstallationsArguments(
+ httpClient: HttpClient,
+ limit: ref limit,
+ after: ref after,
+ before: ref before,
+ includeTotal: ref includeTotal);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListIntegrationInstallationsSecurityRequirements,
+ operationName: "ListIntegrationInstallationsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/installations",
+ baseUri: ResolveBaseUri(
+ servers: s_ListIntegrationInstallationsServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ __pathBuilder
+ .AddOptionalParameter("limit", limit?.ToString())
+ .AddOptionalParameter("after", after)
+ .AddOptionalParameter("before", before)
+ .AddOptionalParameter("include_total", includeTotal?.ToString().ToLowerInvariant())
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListIntegrationInstallationsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ limit: limit,
+ after: after,
+ before: before,
+ includeTotal: includeTotal);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationInstallations",
+ methodName: "ListIntegrationInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationInstallations",
+ methodName: "ListIntegrationInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationInstallations",
+ methodName: "ListIntegrationInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListIntegrationInstallationsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationInstallations",
+ methodName: "ListIntegrationInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationInstallations",
+ methodName: "ListIntegrationInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListIntegrationInstallationsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.IntegrationInstallationListResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.IntegrationInstallationListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListIntegrationProviders.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListIntegrationProviders.g.cs
new file mode 100644
index 0000000..7c925ec
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListIntegrationProviders.g.cs
@@ -0,0 +1,442 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_ListIntegrationProvidersServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_ListIntegrationProvidersSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_ListIntegrationProvidersSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_ListIntegrationProvidersSecurityRequirement0,
+ };
+ partial void PrepareListIntegrationProvidersArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareListIntegrationProvidersRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessListIntegrationProvidersResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListIntegrationProvidersResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List integration providers
+ /// List supported integration provider manifests.
+ ///
+ /// 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 ListIntegrationProvidersAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListIntegrationProvidersAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List integration providers
+ /// List supported integration provider manifests.
+ ///
+ /// 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> ListIntegrationProvidersAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListIntegrationProvidersArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListIntegrationProvidersSecurityRequirements,
+ operationName: "ListIntegrationProvidersAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/providers",
+ baseUri: ResolveBaseUri(
+ servers: s_ListIntegrationProvidersServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListIntegrationProvidersRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationProviders",
+ methodName: "ListIntegrationProvidersAsync",
+ pathTemplate: "\"/v1/integrations/providers\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationProviders",
+ methodName: "ListIntegrationProvidersAsync",
+ pathTemplate: "\"/v1/integrations/providers\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationProviders",
+ methodName: "ListIntegrationProvidersAsync",
+ pathTemplate: "\"/v1/integrations/providers\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListIntegrationProvidersResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationProviders",
+ methodName: "ListIntegrationProvidersAsync",
+ pathTemplate: "\"/v1/integrations/providers\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListIntegrationProviders",
+ methodName: "ListIntegrationProvidersAsync",
+ pathTemplate: "\"/v1/integrations/providers\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListIntegrationProvidersResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.IntegrationProviderListResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.IntegrationProviderListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListSlackInstallations.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListSlackInstallations.g.cs
new file mode 100644
index 0000000..a1a2362
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.ListSlackInstallations.g.cs
@@ -0,0 +1,442 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_ListSlackInstallationsServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_ListSlackInstallationsSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_ListSlackInstallationsSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_ListSlackInstallationsSecurityRequirement0,
+ };
+ partial void PrepareListSlackInstallationsArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareListSlackInstallationsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessListSlackInstallationsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListSlackInstallationsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List connected Slack workspaces
+ /// List connected Slack workspaces with their selected ingestion channel counts.
+ ///
+ /// 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 ListSlackInstallationsAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListSlackInstallationsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List connected Slack workspaces
+ /// List connected Slack workspaces with their selected ingestion channel counts.
+ ///
+ /// 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> ListSlackInstallationsAsResponseAsync(
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListSlackInstallationsArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListSlackInstallationsSecurityRequirements,
+ operationName: "ListSlackInstallationsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/installations",
+ baseUri: ResolveBaseUri(
+ servers: s_ListSlackInstallationsServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListSlackInstallationsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListSlackInstallations",
+ methodName: "ListSlackInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/slack/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListSlackInstallations",
+ methodName: "ListSlackInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/slack/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListSlackInstallations",
+ methodName: "ListSlackInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/slack/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListSlackInstallationsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListSlackInstallations",
+ methodName: "ListSlackInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/slack/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListSlackInstallations",
+ methodName: "ListSlackInstallationsAsync",
+ pathTemplate: "\"/v1/integrations/slack/installations\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListSlackInstallationsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.SlackInstallationOverviewListResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.SlackInstallationOverviewListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.SlackOauthCallback.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.SlackOauthCallback.g.cs
new file mode 100644
index 0000000..0969588
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.SlackOauthCallback.g.cs
@@ -0,0 +1,537 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_SlackOauthCallbackServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_SlackOauthCallbackSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_SlackOauthCallbackSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_SlackOauthCallbackSecurityRequirement0,
+ };
+ partial void PrepareSlackOauthCallbackArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string state,
+ ref string? code,
+ ref string? error);
+ partial void PrepareSlackOauthCallbackRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string state,
+ string? code,
+ string? error);
+ partial void ProcessSlackOauthCallbackResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ ///
+ /// Slack OAuth callback
+ /// Complete Slack OAuth and persist the workspace installation.
+ ///
+ ///
+ /// Slack OAuth state
+ ///
+ ///
+ /// Slack OAuth authorization code
+ ///
+ ///
+ /// Slack OAuth error
+ ///
+ /// 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 SlackOauthCallbackAsync(
+ string state,
+ string? code = default,
+ string? error = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await SlackOauthCallbackAsResponseAsync(
+ state: state,
+ code: code,
+ error: error,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Slack OAuth callback
+ /// Complete Slack OAuth and persist the workspace installation.
+ ///
+ ///
+ /// Slack OAuth state
+ ///
+ ///
+ /// Slack OAuth authorization code
+ ///
+ ///
+ /// Slack OAuth error
+ ///
+ /// 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 SlackOauthCallbackAsResponseAsync(
+ string state,
+ string? code = default,
+ string? error = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareSlackOauthCallbackArguments(
+ httpClient: HttpClient,
+ state: ref state,
+ code: ref code,
+ error: ref error);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_SlackOauthCallbackSecurityRequirements,
+ operationName: "SlackOauthCallbackAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/oauth/callback",
+ baseUri: ResolveBaseUri(
+ servers: s_SlackOauthCallbackServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ __pathBuilder
+ .AddRequiredParameter("state", state)
+ .AddOptionalParameter("code", code)
+ .AddOptionalParameter("error", error)
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareSlackOauthCallbackRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ state: state!,
+ code: code,
+ error: error);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SlackOauthCallback",
+ methodName: "SlackOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SlackOauthCallback",
+ methodName: "SlackOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SlackOauthCallback",
+ methodName: "SlackOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessSlackOauthCallbackResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SlackOauthCallback",
+ methodName: "SlackOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SlackOauthCallback",
+ methodName: "SlackOauthCallbackAsync",
+ pathTemplate: "\"/v1/integrations/slack/oauth/callback\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Redirect after Slack installation
+ if ((int)__response.StatusCode == 307)
+ {
+ string? __content_307 = null;
+ global::System.Exception? __exception_307 = null;
+ string? __value_307 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_307 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ }
+ else
+ {
+ __content_307 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_307 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_307 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_307,
+ responseBody: __content_307,
+ responseObject: __value_307,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.SyncGoogleDrive.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.SyncGoogleDrive.g.cs
new file mode 100644
index 0000000..1adb86c
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.SyncGoogleDrive.g.cs
@@ -0,0 +1,524 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_SyncGoogleDriveServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_SyncGoogleDriveSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_SyncGoogleDriveSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_SyncGoogleDriveSecurityRequirement0,
+ };
+ partial void PrepareSyncGoogleDriveArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Mixedbread.GoogleDriveSyncParams request);
+ partial void PrepareSyncGoogleDriveRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Mixedbread.GoogleDriveSyncParams request);
+ partial void ProcessSyncGoogleDriveResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessSyncGoogleDriveResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Sync a Google Drive connector
+ /// Queue an incremental Google Drive change sync.
+ ///
+ ///
+ /// 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 SyncGoogleDriveAsync(
+
+ global::Mixedbread.GoogleDriveSyncParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await SyncGoogleDriveAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Sync a Google Drive connector
+ /// Queue an incremental Google Drive change sync.
+ ///
+ ///
+ /// 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> SyncGoogleDriveAsResponseAsync(
+
+ global::Mixedbread.GoogleDriveSyncParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareSyncGoogleDriveArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_SyncGoogleDriveSecurityRequirements,
+ operationName: "SyncGoogleDriveAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/google_drive/sync",
+ baseUri: ResolveBaseUri(
+ servers: s_SyncGoogleDriveServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareSyncGoogleDriveRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncGoogleDrive",
+ methodName: "SyncGoogleDriveAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncGoogleDrive",
+ methodName: "SyncGoogleDriveAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncGoogleDrive",
+ methodName: "SyncGoogleDriveAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessSyncGoogleDriveResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncGoogleDrive",
+ methodName: "SyncGoogleDriveAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncGoogleDrive",
+ methodName: "SyncGoogleDriveAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessSyncGoogleDriveResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.GoogleDriveSyncResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.GoogleDriveSyncResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Sync a Google Drive connector
+ /// Queue an incremental Google Drive change sync.
+ ///
+ ///
+ /// Google Drive installation 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 SyncGoogleDriveAsync(
+ global::System.Guid installationId,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Mixedbread.GoogleDriveSyncParams
+ {
+ InstallationId = installationId,
+ };
+
+ return await SyncGoogleDriveAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.SyncSlackChannels.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.SyncSlackChannels.g.cs
new file mode 100644
index 0000000..1edbf19
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.SyncSlackChannels.g.cs
@@ -0,0 +1,535 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_SyncSlackChannelsServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_SyncSlackChannelsSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_SyncSlackChannelsSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_SyncSlackChannelsSecurityRequirement0,
+ };
+ partial void PrepareSyncSlackChannelsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Mixedbread.SlackChannelSyncParams request);
+ partial void PrepareSyncSlackChannelsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Mixedbread.SlackChannelSyncParams request);
+ partial void ProcessSyncSlackChannelsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessSyncSlackChannelsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Sync selected Slack channels
+ /// Queue historical ingestion for selected Slack channels.
+ ///
+ ///
+ /// 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 SyncSlackChannelsAsync(
+
+ global::Mixedbread.SlackChannelSyncParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await SyncSlackChannelsAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Sync selected Slack channels
+ /// Queue historical ingestion for selected Slack channels.
+ ///
+ ///
+ /// 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> SyncSlackChannelsAsResponseAsync(
+
+ global::Mixedbread.SlackChannelSyncParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareSyncSlackChannelsArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_SyncSlackChannelsSecurityRequirements,
+ operationName: "SyncSlackChannelsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/channels/sync",
+ baseUri: ResolveBaseUri(
+ servers: s_SyncSlackChannelsServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareSyncSlackChannelsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncSlackChannels",
+ methodName: "SyncSlackChannelsAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncSlackChannels",
+ methodName: "SyncSlackChannelsAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncSlackChannels",
+ methodName: "SyncSlackChannelsAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessSyncSlackChannelsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncSlackChannels",
+ methodName: "SyncSlackChannelsAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "SyncSlackChannels",
+ methodName: "SyncSlackChannelsAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels/sync\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessSyncSlackChannelsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.SlackChannelSyncResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.SlackChannelSyncResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Sync selected Slack channels
+ /// Queue historical ingestion for selected Slack channels.
+ ///
+ ///
+ /// Slack installation ID
+ ///
+ ///
+ /// Slack channel IDs to sync. Defaults to all selected channels.
+ ///
+ ///
+ /// Only retry Slack items that failed in the most recent import.
+ /// Default Value: false
+ ///
+ /// 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 SyncSlackChannelsAsync(
+ global::System.Guid installationId,
+ global::System.Collections.Generic.IList? channelIds = default,
+ bool? retryFailedOnly = default,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Mixedbread.SlackChannelSyncParams
+ {
+ InstallationId = installationId,
+ ChannelIds = channelIds,
+ RetryFailedOnly = retryFailedOnly,
+ };
+
+ return await SyncSlackChannelsAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateGoogleDriveFolderSelection.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateGoogleDriveFolderSelection.g.cs
new file mode 100644
index 0000000..52d4932
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateGoogleDriveFolderSelection.g.cs
@@ -0,0 +1,529 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_UpdateGoogleDriveFolderSelectionServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_UpdateGoogleDriveFolderSelectionSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_UpdateGoogleDriveFolderSelectionSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_UpdateGoogleDriveFolderSelectionSecurityRequirement0,
+ };
+ partial void PrepareUpdateGoogleDriveFolderSelectionArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Mixedbread.GoogleDriveFolderSelectionUpdateParams request);
+ partial void PrepareUpdateGoogleDriveFolderSelectionRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Mixedbread.GoogleDriveFolderSelectionUpdateParams request);
+ partial void ProcessUpdateGoogleDriveFolderSelectionResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessUpdateGoogleDriveFolderSelectionResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Update Google Drive folders for store ingestion
+ /// Replace the Google Drive folders selected for ingestion into a store.
+ ///
+ ///
+ /// 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 UpdateGoogleDriveFolderSelectionAsync(
+
+ global::Mixedbread.GoogleDriveFolderSelectionUpdateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateGoogleDriveFolderSelectionAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update Google Drive folders for store ingestion
+ /// Replace the Google Drive folders selected for ingestion into a store.
+ ///
+ ///
+ /// 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> UpdateGoogleDriveFolderSelectionAsResponseAsync(
+
+ global::Mixedbread.GoogleDriveFolderSelectionUpdateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareUpdateGoogleDriveFolderSelectionArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_UpdateGoogleDriveFolderSelectionSecurityRequirements,
+ operationName: "UpdateGoogleDriveFolderSelectionAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/google_drive/folders",
+ baseUri: ResolveBaseUri(
+ servers: s_UpdateGoogleDriveFolderSelectionServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Put,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareUpdateGoogleDriveFolderSelectionRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveFolderSelection",
+ methodName: "UpdateGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveFolderSelection",
+ methodName: "UpdateGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveFolderSelection",
+ methodName: "UpdateGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessUpdateGoogleDriveFolderSelectionResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveFolderSelection",
+ methodName: "UpdateGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveFolderSelection",
+ methodName: "UpdateGoogleDriveFolderSelectionAsync",
+ pathTemplate: "\"/v1/integrations/google_drive/folders\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessUpdateGoogleDriveFolderSelectionResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.GoogleDriveFolderSelectionUpdateResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.GoogleDriveFolderSelectionUpdateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Update Google Drive folders for store ingestion
+ /// Replace the Google Drive folders selected for ingestion into a store.
+ ///
+ ///
+ /// Google Drive installation ID
+ ///
+ ///
+ /// Google Drive folder IDs to ingest into the store
+ ///
+ /// 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 UpdateGoogleDriveFolderSelectionAsync(
+ global::System.Guid installationId,
+ global::System.Collections.Generic.IList folderIds,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Mixedbread.GoogleDriveFolderSelectionUpdateParams
+ {
+ InstallationId = installationId,
+ FolderIds = folderIds,
+ };
+
+ return await UpdateGoogleDriveFolderSelectionAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateGoogleDriveInstallationConfig.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateGoogleDriveInstallationConfig.g.cs
new file mode 100644
index 0000000..ab801e5
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateGoogleDriveInstallationConfig.g.cs
@@ -0,0 +1,542 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_UpdateGoogleDriveInstallationConfigServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_UpdateGoogleDriveInstallationConfigSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_UpdateGoogleDriveInstallationConfigSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_UpdateGoogleDriveInstallationConfigSecurityRequirement0,
+ };
+ partial void PrepareUpdateGoogleDriveInstallationConfigArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid installationId,
+ global::Mixedbread.GoogleDriveInstallationConfigUpdateBody request);
+ partial void PrepareUpdateGoogleDriveInstallationConfigRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid installationId,
+ global::Mixedbread.GoogleDriveInstallationConfigUpdateBody request);
+ partial void ProcessUpdateGoogleDriveInstallationConfigResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessUpdateGoogleDriveInstallationConfigResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Update Google Drive data source config
+ /// Update a Google Drive data source config (sync entire Drive). Enabling syncs the whole Drive.
+ ///
+ ///
+ /// Google Drive installation 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 UpdateGoogleDriveInstallationConfigAsync(
+ global::System.Guid installationId,
+
+ global::Mixedbread.GoogleDriveInstallationConfigUpdateBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateGoogleDriveInstallationConfigAsResponseAsync(
+ installationId: installationId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update Google Drive data source config
+ /// Update a Google Drive data source config (sync entire Drive). Enabling syncs the whole Drive.
+ ///
+ ///
+ /// Google Drive installation 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> UpdateGoogleDriveInstallationConfigAsResponseAsync(
+ global::System.Guid installationId,
+
+ global::Mixedbread.GoogleDriveInstallationConfigUpdateBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareUpdateGoogleDriveInstallationConfigArguments(
+ httpClient: HttpClient,
+ installationId: ref installationId,
+ request: request);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_UpdateGoogleDriveInstallationConfigSecurityRequirements,
+ operationName: "UpdateGoogleDriveInstallationConfigAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: $"/v1/integrations/google_drive/installations/{installationId}/config",
+ baseUri: ResolveBaseUri(
+ servers: s_UpdateGoogleDriveInstallationConfigServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Put,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareUpdateGoogleDriveInstallationConfigRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ installationId: installationId!,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveInstallationConfig",
+ methodName: "UpdateGoogleDriveInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveInstallationConfig",
+ methodName: "UpdateGoogleDriveInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveInstallationConfig",
+ methodName: "UpdateGoogleDriveInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessUpdateGoogleDriveInstallationConfigResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveInstallationConfig",
+ methodName: "UpdateGoogleDriveInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateGoogleDriveInstallationConfig",
+ methodName: "UpdateGoogleDriveInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/google_drive/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessUpdateGoogleDriveInstallationConfigResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.GoogleDriveFolderSelectionResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.GoogleDriveFolderSelectionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Update Google Drive data source config
+ /// Update a Google Drive data source config (sync entire Drive). Enabling syncs the whole Drive.
+ ///
+ ///
+ /// Google Drive installation ID
+ ///
+ ///
+ /// Whether the entire Drive (all current and future files) is synced automatically
+ ///
+ /// 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 UpdateGoogleDriveInstallationConfigAsync(
+ global::System.Guid installationId,
+ bool autoSyncAll,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Mixedbread.GoogleDriveInstallationConfigUpdateBody
+ {
+ AutoSyncAll = autoSyncAll,
+ };
+
+ return await UpdateGoogleDriveInstallationConfigAsync(
+ installationId: installationId,
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateSlackChannelSelection.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateSlackChannelSelection.g.cs
new file mode 100644
index 0000000..f0a9dff
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateSlackChannelSelection.g.cs
@@ -0,0 +1,529 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_UpdateSlackChannelSelectionServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_UpdateSlackChannelSelectionSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_UpdateSlackChannelSelectionSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_UpdateSlackChannelSelectionSecurityRequirement0,
+ };
+ partial void PrepareUpdateSlackChannelSelectionArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Mixedbread.SlackChannelSelectionUpdateParams request);
+ partial void PrepareUpdateSlackChannelSelectionRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Mixedbread.SlackChannelSelectionUpdateParams request);
+ partial void ProcessUpdateSlackChannelSelectionResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessUpdateSlackChannelSelectionResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Update Slack channels for store ingestion
+ /// Replace the Slack channels selected for ingestion into a store.
+ ///
+ ///
+ /// 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 UpdateSlackChannelSelectionAsync(
+
+ global::Mixedbread.SlackChannelSelectionUpdateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateSlackChannelSelectionAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update Slack channels for store ingestion
+ /// Replace the Slack channels selected for ingestion into a store.
+ ///
+ ///
+ /// 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> UpdateSlackChannelSelectionAsResponseAsync(
+
+ global::Mixedbread.SlackChannelSelectionUpdateParams request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareUpdateSlackChannelSelectionArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_UpdateSlackChannelSelectionSecurityRequirements,
+ operationName: "UpdateSlackChannelSelectionAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: "/v1/integrations/slack/channels",
+ baseUri: ResolveBaseUri(
+ servers: s_UpdateSlackChannelSelectionServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Put,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareUpdateSlackChannelSelectionRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackChannelSelection",
+ methodName: "UpdateSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackChannelSelection",
+ methodName: "UpdateSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackChannelSelection",
+ methodName: "UpdateSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessUpdateSlackChannelSelectionResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackChannelSelection",
+ methodName: "UpdateSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackChannelSelection",
+ methodName: "UpdateSlackChannelSelectionAsync",
+ pathTemplate: "\"/v1/integrations/slack/channels\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessUpdateSlackChannelSelectionResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.SlackChannelSelectionUpdateResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.SlackChannelSelectionUpdateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Update Slack channels for store ingestion
+ /// Replace the Slack channels selected for ingestion into a store.
+ ///
+ ///
+ /// Slack installation ID
+ ///
+ ///
+ /// Slack channel IDs to ingest into the store
+ ///
+ /// 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 UpdateSlackChannelSelectionAsync(
+ global::System.Guid installationId,
+ global::System.Collections.Generic.IList channelIds,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Mixedbread.SlackChannelSelectionUpdateParams
+ {
+ InstallationId = installationId,
+ ChannelIds = channelIds,
+ };
+
+ return await UpdateSlackChannelSelectionAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateSlackInstallationConfig.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateSlackInstallationConfig.g.cs
new file mode 100644
index 0000000..07eab18
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.UpdateSlackInstallationConfig.g.cs
@@ -0,0 +1,542 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ public partial class IntegrationsClient
+ {
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_UpdateSlackInstallationConfigServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+
+ private static readonly global::Mixedbread.EndPointSecurityRequirement s_UpdateSlackInstallationConfigSecurityRequirement0 =
+ new global::Mixedbread.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Mixedbread.EndPointAuthorizationRequirement[]
+ { new global::Mixedbread.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Mixedbread.EndPointSecurityRequirement[] s_UpdateSlackInstallationConfigSecurityRequirements =
+ new global::Mixedbread.EndPointSecurityRequirement[]
+ { s_UpdateSlackInstallationConfigSecurityRequirement0,
+ };
+ partial void PrepareUpdateSlackInstallationConfigArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid installationId,
+ global::Mixedbread.SlackInstallationConfigUpdateBody request);
+ partial void PrepareUpdateSlackInstallationConfigRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid installationId,
+ global::Mixedbread.SlackInstallationConfigUpdateBody request);
+ partial void ProcessUpdateSlackInstallationConfigResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessUpdateSlackInstallationConfigResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Update Slack data source config
+ /// Update a Slack data source config (auto-sync-all). Enabling it syncs every channel.
+ ///
+ ///
+ /// Slack installation 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 UpdateSlackInstallationConfigAsync(
+ global::System.Guid installationId,
+
+ global::Mixedbread.SlackInstallationConfigUpdateBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateSlackInstallationConfigAsResponseAsync(
+ installationId: installationId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update Slack data source config
+ /// Update a Slack data source config (auto-sync-all). Enabling it syncs every channel.
+ ///
+ ///
+ /// Slack installation 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> UpdateSlackInstallationConfigAsResponseAsync(
+ global::System.Guid installationId,
+
+ global::Mixedbread.SlackInstallationConfigUpdateBody request,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareUpdateSlackInstallationConfigArguments(
+ httpClient: HttpClient,
+ installationId: ref installationId,
+ request: request);
+
+
+ var __authorizations = global::Mixedbread.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_UpdateSlackInstallationConfigSecurityRequirements,
+ operationName: "UpdateSlackInstallationConfigAsync");
+
+ using var __timeoutCancellationTokenSource = global::Mixedbread.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Mixedbread.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Mixedbread.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Mixedbread.PathBuilder(
+ path: $"/v1/integrations/slack/installations/{installationId}/config",
+ baseUri: ResolveBaseUri(
+ servers: s_UpdateSlackInstallationConfigServers,
+ defaultBaseUrl: "https://api.mixedbread.com/"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Put,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareUpdateSlackInstallationConfigRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ installationId: installationId!,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackInstallationConfig",
+ methodName: "UpdateSlackInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackInstallationConfig",
+ methodName: "UpdateSlackInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Mixedbread.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Mixedbread.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackInstallationConfig",
+ methodName: "UpdateSlackInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessUpdateSlackInstallationConfigResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackInstallationConfig",
+ methodName: "UpdateSlackInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Mixedbread.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Mixedbread.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateSlackInstallationConfig",
+ methodName: "UpdateSlackInstallationConfigAsync",
+ pathTemplate: "$\"/v1/integrations/slack/installations/{installationId}/config\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::Mixedbread.HTTPValidationError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::Mixedbread.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessUpdateSlackInstallationConfigResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Mixedbread.SlackChannelSelectionResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Mixedbread.SlackChannelSelectionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Mixedbread.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Mixedbread.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Update Slack data source config
+ /// Update a Slack data source config (auto-sync-all). Enabling it syncs every channel.
+ ///
+ ///
+ /// Slack installation ID
+ ///
+ ///
+ /// Whether all current and future Slack channels are synced automatically
+ ///
+ /// 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 UpdateSlackInstallationConfigAsync(
+ global::System.Guid installationId,
+ bool autoSyncAllChannels,
+ global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Mixedbread.SlackInstallationConfigUpdateBody
+ {
+ AutoSyncAllChannels = autoSyncAllChannels,
+ };
+
+ return await UpdateSlackInstallationConfigAsync(
+ installationId: installationId,
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.g.cs
new file mode 100644
index 0000000..8d8cba7
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.IntegrationsClient.g.cs
@@ -0,0 +1,294 @@
+
+#nullable enable
+
+namespace Mixedbread
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public sealed partial class IntegrationsClient : global::Mixedbread.IIntegrationsClient, global::System.IDisposable
+ {
+ ///
+ /// mixedbread ai production server
+ ///
+ public const string DefaultBaseUrl = "https://api.mixedbread.com/";
+
+ private bool _disposeHttpClient = true;
+
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ public System.Uri? BaseUri => ResolveDisplayedBaseUri();
+
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
+
+ ///
+ public global::Mixedbread.AutoSDKClientOptions Options { get; }
+
+
+ internal global::Mixedbread.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::Mixedbread.AutoSDKServerConfiguration();
+ ///
+ ///
+ ///
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Mixedbread.SourceGenerationContext.Default;
+
+
+
+ private static readonly global::Mixedbread.AutoSDKServer[] s_availableServers = new global::Mixedbread.AutoSDKServer[]
+ { new global::Mixedbread.AutoSDKServer(
+ id: "https-api-mixedbread-com",
+ name: "mixedbread ai production server",
+ url: "https://api.mixedbread.com/",
+ description: "mixedbread ai production server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "https-api-dev-mixedbread-com",
+ name: "mixedbread ai development server",
+ url: "https://api.dev.mixedbread.com/",
+ description: "mixedbread ai development server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-127-0-0-1",
+ name: "mixedbread local server",
+ url: "http://127.0.0.1:8000/",
+ description: "mixedbread local server"),
+ new global::Mixedbread.AutoSDKServer(
+ id: "http-localhost",
+ name: "mixedbread local server",
+ url: "http://localhost:8000/",
+ description: "mixedbread local server"),
+ };
+
+ ///
+ /// The server options available for this client.
+ ///
+ public global::System.Collections.Generic.IReadOnlyList AvailableServers => s_availableServers;
+
+ ///
+ /// The currently selected server for this client, if any.
+ ///
+ public global::Mixedbread.AutoSDKServer? SelectedServer
+ {
+ get => ResolveSelectedServer();
+ set => SelectServer(value);
+ }
+
+ ///
+ /// Creates a new instance of the IntegrationsClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public IntegrationsClient(
+ global::System.Net.Http.HttpClient? httpClient = null,
+ global::System.Uri? baseUri = null,
+ global::System.Collections.Generic.List? authorizations = null,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri,
+ authorizations,
+ options: null,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the IntegrationsClient with explicit options but no base URL override.
+ /// Skips passing baseUri so the default base URL from the OpenAPI spec applies.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public IntegrationsClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Collections.Generic.List? authorizations,
+ global::Mixedbread.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri: null,
+ authorizations,
+ options,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the IntegrationsClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public IntegrationsClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Mixedbread.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true)
+ {
+
+ HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
+ if (baseUri is not null)
+ {
+ HttpClient.BaseAddress ??= baseUri;
+ }
+ Authorizations = authorizations ?? new global::System.Collections.Generic.List();
+ Options = options ?? new global::Mixedbread.AutoSDKClientOptions();
+ _disposeHttpClient = disposeHttpClient;
+
+ AutoSDKServerConfiguration.ExplicitBaseUri = baseUri ?? httpClient?.BaseAddress;
+
+ Initialized(HttpClient);
+ }
+
+ ///
+ public void Dispose()
+ {
+ if (_disposeHttpClient)
+ {
+ HttpClient.Dispose();
+ }
+ }
+
+ partial void Initialized(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareArguments(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareRequest(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpRequestMessage request);
+ partial void ProcessResponse(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response);
+ partial void ProcessResponseContent(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response,
+ ref string content);
+
+
+ ///
+ /// Selects one of the generated server options by id.
+ ///
+ public bool TrySelectServer(string serverId)
+ {
+ if (string.IsNullOrWhiteSpace(serverId))
+ {
+ return false;
+ }
+
+ foreach (var server in s_availableServers)
+ {
+ if (string.Equals(server.Id, serverId, global::System.StringComparison.OrdinalIgnoreCase))
+ {
+ AutoSDKServerConfiguration.SelectedServer = server;
+ AutoSDKServerConfiguration.ExplicitBaseUri = null;
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ ///
+ /// Clears the currently selected server.
+ ///
+ public void ClearSelectedServer()
+ {
+ AutoSDKServerConfiguration.SelectedServer = null;
+ }
+
+ private global::Mixedbread.AutoSDKServer? ResolveSelectedServer()
+ {
+ var selectedServer = AutoSDKServerConfiguration.SelectedServer;
+ if (selectedServer is null)
+ {
+ return null;
+ }
+
+ foreach (var server in s_availableServers)
+ {
+ if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal))
+ {
+ return server;
+ }
+ }
+
+ return null;
+ }
+
+ private void SelectServer(global::Mixedbread.AutoSDKServer? server)
+ {
+ if (server is null)
+ {
+ AutoSDKServerConfiguration.SelectedServer = null;
+ return;
+ }
+
+ foreach (var candidate in s_availableServers)
+ {
+ if (string.Equals(candidate.Id, server.Id, global::System.StringComparison.Ordinal))
+ {
+ AutoSDKServerConfiguration.SelectedServer = candidate;
+ AutoSDKServerConfiguration.ExplicitBaseUri = null;
+ return;
+ }
+ }
+
+ throw new global::System.ArgumentException("The provided server is not available for this client.", nameof(server));
+ }
+
+ private global::System.Uri? ResolveDisplayedBaseUri()
+ {
+ if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri)
+ {
+ return explicitBaseUri;
+ }
+
+ return ResolveSelectedServer()?.Uri ?? (s_availableServers.Length > 0 ? s_availableServers[0].Uri : HttpClient.BaseAddress);
+ }
+
+ private global::System.Uri? ResolveBaseUri(
+ global::Mixedbread.AutoSDKServer[] servers,
+ string defaultBaseUrl)
+ {
+ if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri)
+ {
+ return explicitBaseUri;
+ }
+
+ if (AutoSDKServerConfiguration.SelectedServer is global::Mixedbread.AutoSDKServer selectedServer)
+ {
+ foreach (var server in servers)
+ {
+ if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal))
+ {
+ return server.Uri;
+ }
+ }
+ }
+
+ if (servers.Length > 0)
+ {
+ return servers[0].Uri;
+ }
+
+ return string.IsNullOrWhiteSpace(defaultBaseUrl)
+ ? HttpClient.BaseAddress
+ : new global::System.Uri(defaultBaseUrl, global::System.UriKind.RelativeOrAbsolute);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketAuthType.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketAuthType.g.cs
new file mode 100644
index 0000000..592eae7
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketAuthType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class BucketAuthTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.BucketAuthType Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Mixedbread.BucketAuthTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Mixedbread.BucketAuthType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Mixedbread.BucketAuthType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.BucketAuthType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Mixedbread.BucketAuthTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketAuthTypeNullable.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketAuthTypeNullable.g.cs
new file mode 100644
index 0000000..23522e3
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketAuthTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class BucketAuthTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.BucketAuthType? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Mixedbread.BucketAuthTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Mixedbread.BucketAuthType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Mixedbread.BucketAuthType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.BucketAuthType? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Mixedbread.BucketAuthTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketCreateParamsCredentialsDiscriminatorType.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketCreateParamsCredentialsDiscriminatorType.g.cs
new file mode 100644
index 0000000..ead8e59
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketCreateParamsCredentialsDiscriminatorType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class BucketCreateParamsCredentialsDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketCreateParamsCredentialsDiscriminatorTypeNullable.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketCreateParamsCredentialsDiscriminatorTypeNullable.g.cs
new file mode 100644
index 0000000..ec10d98
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketCreateParamsCredentialsDiscriminatorTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class BucketCreateParamsCredentialsDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketProvider.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketProvider.g.cs
new file mode 100644
index 0000000..544716c
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketProvider.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class BucketProviderJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.BucketProvider Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Mixedbread.BucketProviderExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Mixedbread.BucketProvider)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Mixedbread.BucketProvider);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.BucketProvider value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Mixedbread.BucketProviderExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketProviderNullable.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketProviderNullable.g.cs
new file mode 100644
index 0000000..4bc308b
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketProviderNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class BucketProviderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.BucketProvider? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Mixedbread.BucketProviderExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Mixedbread.BucketProvider)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Mixedbread.BucketProvider?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.BucketProvider? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Mixedbread.BucketProviderExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketStatus.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketStatus.g.cs
new file mode 100644
index 0000000..402db37
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketStatus.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class BucketStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.BucketStatus Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Mixedbread.BucketStatusExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Mixedbread.BucketStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Mixedbread.BucketStatus);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.BucketStatus value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Mixedbread.BucketStatusExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketStatusNullable.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketStatusNullable.g.cs
new file mode 100644
index 0000000..0de54c3
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.BucketStatusNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class BucketStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.BucketStatus? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Mixedbread.BucketStatusExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Mixedbread.BucketStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Mixedbread.BucketStatus?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.BucketStatus? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Mixedbread.BucketStatusExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Credentials.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Credentials.g.cs
new file mode 100644
index 0000000..d98d3fb
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.Credentials.g.cs
@@ -0,0 +1,72 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public class CredentialsJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.Credentials Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+
+ var readerCopy = reader;
+ var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.BucketCreateParamsCredentialsDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.BucketCreateParamsCredentialsDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
+
+ global::Mixedbread.BucketAssumeRoleCredentials? assumeRole = default;
+ if (discriminator?.Type == global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType.AssumeRole)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.BucketAssumeRoleCredentials), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.BucketAssumeRoleCredentials)}");
+ assumeRole = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+ global::Mixedbread.BucketAccessKeyCredentials? accessKey = default;
+ if (discriminator?.Type == global::Mixedbread.BucketCreateParamsCredentialsDiscriminatorType.AccessKey)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.BucketAccessKeyCredentials), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.BucketAccessKeyCredentials)}");
+ accessKey = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+
+ var __value = new global::Mixedbread.Credentials(
+ discriminator?.Type,
+ assumeRole,
+
+ accessKey
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.Credentials value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ if (value.IsAssumeRole)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.BucketAssumeRoleCredentials), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.BucketAssumeRoleCredentials).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssumeRole!, typeInfo);
+ }
+ else if (value.IsAccessKey)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.BucketAccessKeyCredentials), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.BucketAccessKeyCredentials).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AccessKey!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs
index 15560ae..b46ee21 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.DataItem.g.cs
@@ -42,6 +42,13 @@ public class DataItemJsonConverter : global::System.Text.Json.Serialization.Json
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreAgenticSearchEvent)}");
agenticSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
+ global::Mixedbread.StoreGrepEvent? grep = default;
+ if (discriminator?.Type == global::Mixedbread.StoreEventListResponseDataItemDiscriminatorType.Grep)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreGrepEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Mixedbread.StoreGrepEvent)}");
+ grep = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
var __value = new global::Mixedbread.DataItem(
discriminator?.Type,
@@ -49,7 +56,9 @@ public class DataItemJsonConverter : global::System.Text.Json.Serialization.Json
search,
- agenticSearch
+ agenticSearch,
+
+ grep
);
return __value;
@@ -82,6 +91,12 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.StoreAgenticSearchEvent).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgenticSearch!, typeInfo);
}
+ else if (value.IsGrep)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Mixedbread.StoreGrepEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Mixedbread.StoreGrepEvent).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Grep!, typeInfo);
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.IntegrationProviderManifestAuthType.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.IntegrationProviderManifestAuthType.g.cs
new file mode 100644
index 0000000..c21864c
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.IntegrationProviderManifestAuthType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class IntegrationProviderManifestAuthTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Mixedbread.IntegrationProviderManifestAuthType Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Mixedbread.IntegrationProviderManifestAuthTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Mixedbread.IntegrationProviderManifestAuthType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Mixedbread.IntegrationProviderManifestAuthType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Mixedbread.IntegrationProviderManifestAuthType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Mixedbread.IntegrationProviderManifestAuthTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.IntegrationProviderManifestAuthTypeNullable.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.IntegrationProviderManifestAuthTypeNullable.g.cs
new file mode 100644
index 0000000..eba6e9d
--- /dev/null
+++ b/src/libs/Mixedbread/Generated/Mixedbread.JsonConverters.IntegrationProviderManifestAuthTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Mixedbread.JsonConverters
+{
+ ///
+ public sealed class IntegrationProviderManifestAuthTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///