diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.Asset.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.Asset.g.cs
index 80b33b2..2adb380 100644
--- a/src/libs/Shotstack/Generated/Shotstack.Models.Asset.g.cs
+++ b/src/libs/Shotstack/Generated/Shotstack.Models.Asset.g.cs
@@ -507,6 +507,11 @@ public Asset(global::Shotstack.VideoAsset? value)
Video = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromVideo(global::Shotstack.VideoAsset? value) => new Asset(value);
+
///
///
///
@@ -525,6 +530,11 @@ public Asset(global::Shotstack.ImageAsset? value)
Image = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromImage(global::Shotstack.ImageAsset? value) => new Asset(value);
+
///
///
///
@@ -543,6 +553,11 @@ public Asset(global::Shotstack.TextAsset? value)
Text = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromText(global::Shotstack.TextAsset? value) => new Asset(value);
+
///
///
///
@@ -561,6 +576,11 @@ public Asset(global::Shotstack.RichTextAsset? value)
RichText = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromRichText(global::Shotstack.RichTextAsset? value) => new Asset(value);
+
///
///
///
@@ -579,6 +599,11 @@ public Asset(global::Shotstack.AudioAsset? value)
Audio = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromAudio(global::Shotstack.AudioAsset? value) => new Asset(value);
+
///
///
///
@@ -597,6 +622,11 @@ public Asset(global::Shotstack.LumaAsset? value)
Luma = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromLuma(global::Shotstack.LumaAsset? value) => new Asset(value);
+
///
///
///
@@ -615,6 +645,11 @@ public Asset(global::Shotstack.CaptionAsset? value)
Caption = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromCaption(global::Shotstack.CaptionAsset? value) => new Asset(value);
+
///
///
///
@@ -633,6 +668,11 @@ public Asset(global::Shotstack.RichCaptionAsset? value)
RichCaption = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromRichCaption(global::Shotstack.RichCaptionAsset? value) => new Asset(value);
+
///
///
///
@@ -651,6 +691,11 @@ public Asset(global::Shotstack.HtmlAsset? value)
Html = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromHtml(global::Shotstack.HtmlAsset? value) => new Asset(value);
+
///
///
///
@@ -669,6 +714,11 @@ public Asset(global::Shotstack.TitleAsset? value)
Title = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromTitle(global::Shotstack.TitleAsset? value) => new Asset(value);
+
///
///
///
@@ -687,6 +737,11 @@ public Asset(global::Shotstack.ShapeAsset? value)
Shape = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromShape(global::Shotstack.ShapeAsset? value) => new Asset(value);
+
///
///
///
@@ -705,6 +760,11 @@ public Asset(global::Shotstack.SvgAsset? value)
Svg = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromSvg(global::Shotstack.SvgAsset? value) => new Asset(value);
+
///
///
///
@@ -723,6 +783,11 @@ public Asset(global::Shotstack.TextToImageAsset? value)
TextToImage = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromTextToImage(global::Shotstack.TextToImageAsset? value) => new Asset(value);
+
///
///
///
@@ -741,6 +806,11 @@ public Asset(global::Shotstack.ImageToVideoAsset? value)
ImageToVideo = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromImageToVideo(global::Shotstack.ImageToVideoAsset? value) => new Asset(value);
+
///
///
///
@@ -759,6 +829,11 @@ public Asset(global::Shotstack.TextToSpeechAsset? value)
TextToSpeech = value;
}
+ ///
+ ///
+ ///
+ public static Asset FromTextToSpeech(global::Shotstack.TextToSpeechAsset? value) => new Asset(value);
+
///
///
///
diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.AudioEnhancement.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.AudioEnhancement.g.cs
index e36edda..ce7fcf4 100644
--- a/src/libs/Shotstack/Generated/Shotstack.Models.AudioEnhancement.g.cs
+++ b/src/libs/Shotstack/Generated/Shotstack.Models.AudioEnhancement.g.cs
@@ -59,6 +59,11 @@ public AudioEnhancement(global::Shotstack.DolbyEnhancement? value)
Dolby = value;
}
+ ///
+ ///
+ ///
+ public static AudioEnhancement FromDolby(global::Shotstack.DolbyEnhancement? value) => new AudioEnhancement(value);
+
///
///
///
diff --git a/src/libs/Shotstack/Generated/Shotstack.Models.Destinations.g.cs b/src/libs/Shotstack/Generated/Shotstack.Models.Destinations.g.cs
index 384736e..fea150a 100644
--- a/src/libs/Shotstack/Generated/Shotstack.Models.Destinations.g.cs
+++ b/src/libs/Shotstack/Generated/Shotstack.Models.Destinations.g.cs
@@ -297,6 +297,11 @@ public Destinations(global::Shotstack.ShotstackDestination? value)
ShotstackDestination = value;
}
+ ///
+ ///
+ ///
+ public static Destinations FromShotstackDestination(global::Shotstack.ShotstackDestination? value) => new Destinations(value);
+
///
///
///
@@ -315,6 +320,11 @@ public Destinations(global::Shotstack.MuxDestination? value)
MuxDestination = value;
}
+ ///
+ ///
+ ///
+ public static Destinations FromMuxDestination(global::Shotstack.MuxDestination? value) => new Destinations(value);
+
///
///
///
@@ -333,6 +343,11 @@ public Destinations(global::Shotstack.S3Destination? value)
S3Destination = value;
}
+ ///
+ ///
+ ///
+ public static Destinations FromS3Destination(global::Shotstack.S3Destination? value) => new Destinations(value);
+
///
///
///
@@ -351,6 +366,11 @@ public Destinations(global::Shotstack.GoogleCloudStorageDestination? value)
GoogleCloudStorageDestination = value;
}
+ ///
+ ///
+ ///
+ public static Destinations FromGoogleCloudStorageDestination(global::Shotstack.GoogleCloudStorageDestination? value) => new Destinations(value);
+
///
///
///
@@ -369,6 +389,11 @@ public Destinations(global::Shotstack.GoogleDriveDestination? value)
GoogleDriveDestination = value;
}
+ ///
+ ///
+ ///
+ public static Destinations FromGoogleDriveDestination(global::Shotstack.GoogleDriveDestination? value) => new Destinations(value);
+
///
///
///
@@ -387,6 +412,11 @@ public Destinations(global::Shotstack.VimeoDestination? value)
VimeoDestination = value;
}
+ ///
+ ///
+ ///
+ public static Destinations FromVimeoDestination(global::Shotstack.VimeoDestination? value) => new Destinations(value);
+
///
///
///
@@ -405,6 +435,11 @@ public Destinations(global::Shotstack.TiktokDestination? value)
TiktokDestination = value;
}
+ ///
+ ///
+ ///
+ public static Destinations FromTiktokDestination(global::Shotstack.TiktokDestination? value) => new Destinations(value);
+
///
///
///
@@ -423,6 +458,11 @@ public Destinations(global::Shotstack.AkamaiNetStorageDestination? value)
AkamaiNetStorageDestination = value;
}
+ ///
+ ///
+ ///
+ public static Destinations FromAkamaiNetStorageDestination(global::Shotstack.AkamaiNetStorageDestination? value) => new Destinations(value);
+
///
///
///
@@ -441,6 +481,11 @@ public Destinations(global::Shotstack.AzureBlobStorageDestination? value)
AzureBlobStorageDestination = value;
}
+ ///
+ ///
+ ///
+ public static Destinations FromAzureBlobStorageDestination(global::Shotstack.AzureBlobStorageDestination? value) => new Destinations(value);
+
///
///
///
diff --git a/src/libs/Shotstack/Generated/Shotstack.OneOf.2.g.cs b/src/libs/Shotstack/Generated/Shotstack.OneOf.2.g.cs
index 1d923a9..d5e7d53 100644
--- a/src/libs/Shotstack/Generated/Shotstack.OneOf.2.g.cs
+++ b/src/libs/Shotstack/Generated/Shotstack.OneOf.2.g.cs
@@ -85,6 +85,11 @@ public OneOf(T1? value)
Value1 = value;
}
+ ///
+ ///
+ ///
+ public static OneOf FromValue1(T1? value) => new OneOf(value);
+
///
///
///
@@ -103,6 +108,11 @@ public OneOf(T2? value)
Value2 = value;
}
+ ///
+ ///
+ ///
+ public static OneOf FromValue2(T2? value) => new OneOf(value);
+
///
///
///
diff --git a/src/libs/Shotstack/Generated/Shotstack.OptionsSupport.g.cs b/src/libs/Shotstack/Generated/Shotstack.OptionsSupport.g.cs
index dd75f3f..cc12518 100644
--- a/src/libs/Shotstack/Generated/Shotstack.OptionsSupport.g.cs
+++ b/src/libs/Shotstack/Generated/Shotstack.OptionsSupport.g.cs
@@ -54,6 +54,156 @@ public sealed class AutoSDKClientOptions
Hooks.Add(hook ?? throw new global::System.ArgumentNullException(nameof(hook)));
return this;
}
+
+ ///
+ /// Optional per-request authorization provider invoked before each request is sent.
+ /// Set this when the client is registered as a singleton in DI but each call needs
+ /// a fresh credential resolved from a provider, secret-store, or session — instead
+ /// of mutating the shared Authorizations list at construction time.
+ ///
+ public global::Shotstack.IAutoSDKAuthorizationProvider? AuthorizationProvider { get; set; }
+
+ ///
+ /// Convenience helper that registers
+ /// using so request-level auth is resolved without
+ /// touching shared client state.
+ ///
+ ///
+ public global::Shotstack.AutoSDKClientOptions UseAuthorizationProvider(
+ global::Shotstack.IAutoSDKAuthorizationProvider provider)
+ {
+ AuthorizationProvider = provider ?? throw new global::System.ArgumentNullException(nameof(provider));
+ if (Hooks.Find(static x => x is global::Shotstack.AutoSDKAuthorizationProviderHook) == null)
+ {
+ Hooks.Add(new global::Shotstack.AutoSDKAuthorizationProviderHook());
+ }
+
+ return this;
+ }
+ }
+
+ ///
+ /// A request-level authorization value supplied by .
+ /// Mirrors the runtime fields the SDK applies for HTTP / OAuth2 / API-key auth without
+ /// requiring the consumer to construct the generated EndPointAuthorization type.
+ ///
+ public readonly struct AutoSDKAuthorizationValue
+ {
+ ///
+ /// Initializes a new .
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public AutoSDKAuthorizationValue(
+ string value,
+ string scheme = "Bearer",
+ string? headerName = null,
+ string location = "Header",
+ string type = "Http")
+ {
+ Value = value ?? string.Empty;
+ Scheme = string.IsNullOrWhiteSpace(scheme) ? "Bearer" : scheme;
+ HeaderName = headerName ?? string.Empty;
+ Location = string.IsNullOrWhiteSpace(location) ? "Header" : location;
+ Type = string.IsNullOrWhiteSpace(type) ? "Http" : type;
+ }
+
+ /// The credential value (token, API key, etc.).
+ public string Value { get; }
+
+ /// The HTTP authorization scheme — typically Bearer, Basic, or Token.
+ public string Scheme { get; }
+
+ /// The custom header name when is ApiKey; ignored for HTTP/OAuth2 auth.
+ public string HeaderName { get; }
+
+ /// The credential location — Header, Query, or Cookie.
+ public string Location { get; }
+
+ /// The auth type — Http, OAuth2, OpenIdConnect, or ApiKey.
+ public string Type { get; }
+
+ /// Convenience factory for a Bearer token.
+ public static global::Shotstack.AutoSDKAuthorizationValue Bearer(string token) => new(value: token, scheme: "Bearer");
+
+ /// Convenience factory for an API-key header.
+ public static global::Shotstack.AutoSDKAuthorizationValue ApiKeyHeader(string name, string value) =>
+ new(value: value, headerName: name, location: "Header", type: "ApiKey");
+ }
+
+ ///
+ /// Resolves request-level authorization values without mutating the shared client
+ /// authorization list. Implementations should be safe to invoke concurrently —
+ /// the hook calls them once per outgoing request.
+ ///
+ public interface IAutoSDKAuthorizationProvider
+ {
+ ///
+ /// Returns one or more values to apply to
+ /// the current request, or an empty list / null to leave the request as-is.
+ ///
+ ///
+ global::System.Threading.Tasks.Task?> ResolveAsync(
+ global::Shotstack.AutoSDKHookContext context);
+ }
+
+ ///
+ /// Built-in that consults
+ /// before every outgoing
+ /// request and stamps the resolved values onto the .
+ ///
+ public sealed class AutoSDKAuthorizationProviderHook : global::Shotstack.AutoSDKHook
+ {
+ ///
+ public override async global::System.Threading.Tasks.Task OnBeforeRequestAsync(
+ global::Shotstack.AutoSDKHookContext context)
+ {
+ context = context ?? throw new global::System.ArgumentNullException(nameof(context));
+
+ var provider = context.ClientOptions?.AuthorizationProvider;
+ if (provider == null || context.Request == null)
+ {
+ return;
+ }
+
+ var resolved = await provider.ResolveAsync(context).ConfigureAwait(false);
+ if (resolved == null || resolved.Count == 0)
+ {
+ return;
+ }
+
+ for (var index = 0; index < resolved.Count; index++)
+ {
+ ApplyAuthorization(context.Request, resolved[index]);
+ }
+ }
+
+ private static void ApplyAuthorization(
+ global::System.Net.Http.HttpRequestMessage request,
+ global::Shotstack.AutoSDKAuthorizationValue authorization)
+ {
+ switch (authorization.Type)
+ {
+ case "Http":
+ case "OAuth2":
+ case "OpenIdConnect":
+ request.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: authorization.Scheme,
+ parameter: authorization.Value);
+ break;
+ case "ApiKey":
+ if (string.Equals(authorization.Location, "Header", global::System.StringComparison.OrdinalIgnoreCase) &&
+ !string.IsNullOrEmpty(authorization.HeaderName))
+ {
+ request.Headers.Remove(authorization.HeaderName);
+ request.Headers.TryAddWithoutValidation(authorization.HeaderName, authorization.Value ?? string.Empty);
+ }
+ break;
+ }
+ }
}
///