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 @@ -146,186 +146,5 @@ public partial interface ISubpackageDeepfakeDetectionClient
bool? zeroRetentionMode = default,
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Create a batch deepfake detection job<br/>
/// Submit up to 50 files in a single request and process them as a single logical<br/>
/// group. Returns HTTP 202 with a batch UUID; each file is analyzed in the<br/>
/// background and individual results are available via `GET /detect/{uuid}` for<br/>
/// each entry in `detect_uuids`.<br/>
/// Two intake methods:<br/>
/// - **Multiple media files** — repeated `files[]` form fields.<br/>
/// - **Single zip archive** — a single `file` form field whose value is a `.zip`<br/>
/// containing the media files. Non-media entries are skipped.<br/>
/// Provide one of `files[]` or `file=&lt;...&gt;.zip` per request. Synchronous mode<br/>
/// (`Prefer: wait`) is not supported and returns 400 if sent.<br/>
/// Constraints:<br/>
/// - Maximum 50 files per batch.<br/>
/// - Maximum 500 MB total upload size across all files.<br/>
/// - Allowed file types match `POST /detect`'s direct-upload allowlist.<br/>
/// - All-or-nothing billing: if the team's wallet cannot cover the projected cost<br/>
/// for every file, the request is rejected with 402 and no detects are created.
/// </summary>
/// <param name="files">
/// One or more media files. Repeat the `files[]` field for each file. Mutually exclusive with `file`.
/// </param>
/// <param name="filesFileNames">
/// Optional file names to use for the multipart 'files[]' file parts.
/// </param>
/// <param name="file">
/// A single `.zip` archive containing media files. Mutually exclusive with `files[]`.
/// </param>
/// <param name="filename">
/// A single `.zip` archive containing media files. Mutually exclusive with `files[]`.
/// </param>
/// <param name="callbackUrl">
/// POST destination invoked when the batch reaches a terminal state.
/// </param>
/// <param name="intelligence">
/// Run multimodal intelligence on every file in the batch.<br/>
/// Default Value: false
/// </param>
/// <param name="searchIdentity">
/// Run identity search against the team's saved identities (audio/video only).<br/>
/// Default Value: false
/// </param>
/// <param name="visualize">
/// Generate visualization artifacts.<br/>
/// Default Value: true
/// </param>
/// <param name="audioSourceTracingEnabled">
/// Enable audio source tracing on each audio file.<br/>
/// Default Value: false
/// </param>
/// <param name="frameLength">
/// Window size in seconds (audio/video).
/// </param>
/// <param name="startRegion">
/// Start of segment to analyze (seconds).
/// </param>
/// <param name="endRegion">
/// End of segment to analyze (seconds).
/// </param>
/// <param name="maxVideoSecs">
/// Cap processed video duration.
/// </param>
/// <param name="useLlm">
/// Use LLM-assisted video analysis.
/// </param>
/// <param name="zeroRetentionMode">
/// Enable Zero Retention Mode for every file in the batch.<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::ResembleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ResembleAI.DeepfakeDetectionCreateDetectBatchResponse202> CreateDetectBatchAsync(
global::System.Collections.Generic.IReadOnlyList<global::System.IO.Stream>? files = default,
global::System.Collections.Generic.IReadOnlyList<string>? filesFileNames = default,
global::System.IO.Stream? file = default,
string? filename = default,
string? callbackUrl = default,
bool? intelligence = default,
bool? searchIdentity = default,
bool? visualize = default,
bool? audioSourceTracingEnabled = default,
int? frameLength = default,
double? startRegion = default,
double? endRegion = default,
double? maxVideoSecs = default,
bool? useLlm = default,
bool? zeroRetentionMode = default,
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a batch deepfake detection job<br/>
/// Submit up to 50 files in a single request and process them as a single logical<br/>
/// group. Returns HTTP 202 with a batch UUID; each file is analyzed in the<br/>
/// background and individual results are available via `GET /detect/{uuid}` for<br/>
/// each entry in `detect_uuids`.<br/>
/// Two intake methods:<br/>
/// - **Multiple media files** — repeated `files[]` form fields.<br/>
/// - **Single zip archive** — a single `file` form field whose value is a `.zip`<br/>
/// containing the media files. Non-media entries are skipped.<br/>
/// Provide one of `files[]` or `file=&lt;...&gt;.zip` per request. Synchronous mode<br/>
/// (`Prefer: wait`) is not supported and returns 400 if sent.<br/>
/// Constraints:<br/>
/// - Maximum 50 files per batch.<br/>
/// - Maximum 500 MB total upload size across all files.<br/>
/// - Allowed file types match `POST /detect`'s direct-upload allowlist.<br/>
/// - All-or-nothing billing: if the team's wallet cannot cover the projected cost<br/>
/// for every file, the request is rejected with 402 and no detects are created.
/// </summary>
/// <param name="files">
/// One or more media files. Repeat the `files[]` field for each file. Mutually exclusive with `file`.
/// </param>
/// <param name="filesFileNames">
/// Optional file names to use for the multipart 'files[]' file parts.
/// </param>
/// <param name="file">
/// A single `.zip` archive containing media files. Mutually exclusive with `files[]`.
/// </param>
/// <param name="filename">
/// A single `.zip` archive containing media files. Mutually exclusive with `files[]`.
/// </param>
/// <param name="callbackUrl">
/// POST destination invoked when the batch reaches a terminal state.
/// </param>
/// <param name="intelligence">
/// Run multimodal intelligence on every file in the batch.<br/>
/// Default Value: false
/// </param>
/// <param name="searchIdentity">
/// Run identity search against the team's saved identities (audio/video only).<br/>
/// Default Value: false
/// </param>
/// <param name="visualize">
/// Generate visualization artifacts.<br/>
/// Default Value: true
/// </param>
/// <param name="audioSourceTracingEnabled">
/// Enable audio source tracing on each audio file.<br/>
/// Default Value: false
/// </param>
/// <param name="frameLength">
/// Window size in seconds (audio/video).
/// </param>
/// <param name="startRegion">
/// Start of segment to analyze (seconds).
/// </param>
/// <param name="endRegion">
/// End of segment to analyze (seconds).
/// </param>
/// <param name="maxVideoSecs">
/// Cap processed video duration.
/// </param>
/// <param name="useLlm">
/// Use LLM-assisted video analysis.
/// </param>
/// <param name="zeroRetentionMode">
/// Enable Zero Retention Mode for every file in the batch.<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::ResembleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ResembleAI.AutoSDKHttpResponse<global::ResembleAI.DeepfakeDetectionCreateDetectBatchResponse202>> CreateDetectBatchAsResponseAsync(
global::System.Collections.Generic.IReadOnlyList<global::System.IO.Stream>? files = default,
global::System.Collections.Generic.IReadOnlyList<string>? filesFileNames = default,
global::System.IO.Stream? file = default,
string? filename = default,
string? callbackUrl = default,
bool? intelligence = default,
bool? searchIdentity = default,
bool? visualize = default,
bool? audioSourceTracingEnabled = default,
int? frameLength = default,
double? startRegion = default,
double? endRegion = default,
double? maxVideoSecs = default,
bool? useLlm = default,
bool? zeroRetentionMode = default,
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,50 +52,5 @@ public partial interface ISubpackageSpeechToTextClient
string? query = default,
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Create transcript job<br/>
/// Submit audio or video for transcription
/// </summary>
/// <param name="file">
/// Audio or video file (max 500 MB, 20 minutes)
/// </param>
/// <param name="filename">
/// Audio or video file (max 500 MB, 20 minutes)
/// </param>
/// <param name="query">
/// Optional intelligence question to evaluate after transcription
/// </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::ResembleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ResembleAI.SpeechToTextCreateTranscriptResponse200> CreateTranscriptAsync(
global::System.IO.Stream? file = default,
string? filename = default,
string? query = default,
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create transcript job<br/>
/// Submit audio or video for transcription
/// </summary>
/// <param name="file">
/// Audio or video file (max 500 MB, 20 minutes)
/// </param>
/// <param name="filename">
/// Audio or video file (max 500 MB, 20 minutes)
/// </param>
/// <param name="query">
/// Optional intelligence question to evaluate after transcription
/// </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::ResembleAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::ResembleAI.AutoSDKHttpResponse<global::ResembleAI.SpeechToTextCreateTranscriptResponse200>> CreateTranscriptAsResponseAsync(
global::System.IO.Stream? file = default,
string? filename = default,
string? query = default,
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
81 changes: 81 additions & 0 deletions src/libs/ResembleAI/Generated/ResembleAI.OptionsSupport.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,84 @@ public interface IAutoSDKAuthorizationProvider
global::ResembleAI.AutoSDKHookContext context);
}

/// <summary>
/// Marker keys stamped onto outgoing <see cref="global::System.Net.Http.HttpRequestMessage"/>
/// instances so consumer <see cref="global::System.Net.Http.DelegatingHandler"/>s — and any
/// other transport-layer code that runs after AutoSDK's send pipeline — can observe whether
/// the resolved Authorization is call-scoped and opt out of overwriting it with a
/// rotation-aware account-level credential.
/// </summary>
public static class AutoSDKHttpRequestOptions
{
/// <summary>
/// Key under which <see cref="StampAuthorizationOverride"/> records the marker. Exposed
/// for handlers that target frameworks older than .NET 5 and need to read the value
/// through the legacy <c>HttpRequestMessage.Properties</c> bag.
/// </summary>
public const string AuthorizationOverrideKey = "AutoSDK.AuthorizationOverride";

#if NET5_0_OR_GREATER
/// <summary>
/// Strongly-typed <see cref="global::System.Net.Http.HttpRequestOptionsKey{TValue}"/> for
/// the call-scoped Authorization marker on .NET 5+ targets. Consumers should prefer this
/// over the legacy <c>HttpRequestMessage.Properties</c> bag where available.
/// </summary>
public static readonly global::System.Net.Http.HttpRequestOptionsKey<bool> AuthorizationOverride =
new global::System.Net.Http.HttpRequestOptionsKey<bool>(AuthorizationOverrideKey);
#endif

/// <summary>
/// Stamps the call-scoped Authorization marker on <paramref name="request"/>. AutoSDK's
/// built-in <see cref="AutoSDKAuthorizationProviderHook"/> calls this whenever the
/// resolved auth came from a per-request override or a client-level
/// <see cref="IAutoSDKAuthorizationProvider"/>. Hand-written SDK extensions that set a
/// non-default <c>Authorization</c> header (e.g. a session-scoped bearer returned by an
/// upstream poll) should call this too so downstream rotation handlers know to skip the
/// overwrite.
/// </summary>
/// <param name="request"></param>
public static void StampAuthorizationOverride(
global::System.Net.Http.HttpRequestMessage? request)
{
if (request is null)
{
return;
}

#if NET5_0_OR_GREATER
request.Options.Set(AuthorizationOverride, true);
#else
#pragma warning disable CS0618 // HttpRequestMessage.Properties is obsolete in NET5+, but the only option below it.
request.Properties[AuthorizationOverrideKey] = true;
#pragma warning restore CS0618
#endif
}

/// <summary>
/// Returns true when <see cref="StampAuthorizationOverride"/> previously marked the
/// request as carrying a call-scoped Authorization.
/// </summary>
/// <param name="request"></param>
public static bool HasAuthorizationOverride(
global::System.Net.Http.HttpRequestMessage? request)
{
if (request is null)
{
return false;
}

#if NET5_0_OR_GREATER
return request.Options.TryGetValue(AuthorizationOverride, out var value) && value;
#else
#pragma warning disable CS0618
return request.Properties.TryGetValue(AuthorizationOverrideKey, out var raw) &&
raw is bool flag &&
flag;
#pragma warning restore CS0618
#endif
}
}

/// <summary>
/// Built-in <see cref="IAutoSDKHook"/> that consults
/// <see cref="AutoSDKClientOptions.AuthorizationProvider"/> before every outgoing
Expand All @@ -176,6 +254,7 @@ public sealed class AutoSDKAuthorizationProviderHook : global::ResembleAI.AutoSD
ApplyAuthorization(context.Request, perRequest[index]);
}

global::ResembleAI.AutoSDKHttpRequestOptions.StampAuthorizationOverride(context.Request);
return;
}

Expand All @@ -195,6 +274,8 @@ public sealed class AutoSDKAuthorizationProviderHook : global::ResembleAI.AutoSD
{
ApplyAuthorization(context.Request, resolved[index]);
}

global::ResembleAI.AutoSDKHttpRequestOptions.StampAuthorizationOverride(context.Request);
}

private static void ApplyAuthorization(
Expand Down
Loading