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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,44 @@ partial void ProcessReingestAllStoresResponseContent(
bool? billable = default,
global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await ReingestAllStoresAsResponseAsync(
organizationId: organizationId,
storeIdentifier: storeIdentifier,
statuses: statuses,
billable: billable,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);

return __response.Body;
}
/// <summary>
/// Reingest all stores<br/>
/// Reingest all stores across all organizations (admin only).<br/>
/// This endpoint creates StoreFileReingestionJob for each store.<br/>
/// Returns:<br/>
/// dict: Confirmation message with count of jobs created.
/// </summary>
/// <param name="organizationId"></param>
/// <param name="storeIdentifier"></param>
/// <param name="statuses">
/// Statuses of files to reingest
/// </param>
/// <param name="billable">
/// Whether the reingestion is billable to the user<br/>
/// Default Value: false
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Mixedbread.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Mixedbread.AutoSDKHttpResponse<string>> ReingestAllStoresAsResponseAsync(
global::System.Guid organizationId,
string storeIdentifier,
global::System.Collections.Generic.IList<global::Mixedbread.VectorStoreFileStatus>? statuses = default,
bool? billable = default,
global::Mixedbread.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
Expand Down Expand Up @@ -128,14 +166,15 @@ partial void ProcessReingestAllStoresResponseContent(

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

var __pathBuilder = new global::Mixedbread.PathBuilder(
path: $"/v1/admin/stores/{organizationId}/{storeIdentifier}/reingest",
baseUri: ResolveBaseUri(
servers: s_ReingestAllStoresServers,
defaultBaseUrl: "https://api.mixedbread.com/"));
defaultBaseUrl: "https://api.mixedbread.com/"));
__pathBuilder
.AddOptionalParameter("statuses", statuses?.ToString())
.AddOptionalParameter("billable", billable?.ToString().ToLowerInvariant())
.AddOptionalParameter("billable", billable?.ToString().ToLowerInvariant())
;
var __path = __pathBuilder.ToString();
__path = global::Mixedbread.AutoSDKRequestOptionsSupport.AppendQueryParameters(
Expand Down Expand Up @@ -210,6 +249,8 @@ partial void ProcessReingestAllStoresResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
Expand All @@ -220,6 +261,11 @@ partial void ProcessReingestAllStoresResponseContent(
}
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,
Expand All @@ -237,6 +283,8 @@ partial void ProcessReingestAllStoresResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
Expand All @@ -246,8 +294,7 @@ partial void ProcessReingestAllStoresResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Mixedbread.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand All @@ -256,6 +303,11 @@ partial void ProcessReingestAllStoresResponseContent(
__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(
Expand All @@ -272,14 +324,15 @@ partial void ProcessReingestAllStoresResponseContent(
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(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand Down Expand Up @@ -319,6 +372,8 @@ partial void ProcessReingestAllStoresResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
Expand All @@ -339,6 +394,8 @@ partial void ProcessReingestAllStoresResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Validation Error
Expand Down Expand Up @@ -401,7 +458,11 @@ partial void ProcessReingestAllStoresResponseContent(
{
__response.EnsureSuccessStatusCode();

return __content;
return new global::Mixedbread.AutoSDKHttpResponse<string>(
statusCode: __response.StatusCode,
headers: global::Mixedbread.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
body: __content);
}
catch (global::System.Exception __ex)
{
Expand Down Expand Up @@ -429,7 +490,11 @@ partial void ProcessReingestAllStoresResponseContent(
#endif
).ConfigureAwait(false);

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

Expand Down
Loading
Loading