diff --git a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ImportProjectMedia.g.cs b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ImportProjectMedia.g.cs
index dd9f4d4..7363bc6 100644
--- a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ImportProjectMedia.g.cs
+++ b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ImportProjectMedia.g.cs
@@ -36,7 +36,7 @@ partial void ProcessImportProjectMediaResponseContent(
/// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
/// - [Supported file types](https://help.descript.com/hc/en-us/articles/10164098416909-Supported-file-types)
/// ### Direct file upload
- /// **[Work in progress]** Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
/// ### Async Operations
/// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
/// ### Dynamic webhook
@@ -440,7 +440,7 @@ partial void ProcessImportProjectMediaResponseContent(
/// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
/// - [Supported file types](https://help.descript.com/hc/en-us/articles/10164098416909-Supported-file-types)
/// ### Direct file upload
- /// **[Work in progress]** Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
/// ### Async Operations
/// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
/// ### Dynamic webhook
@@ -487,7 +487,7 @@ partial void ProcessImportProjectMediaResponseContent(
global::System.Guid? projectId = default,
string? projectName = default,
global::Descript.ImportProjectMediaRequestTeamAccess? teamAccess = default,
- global::System.Collections.Generic.Dictionary>? addMedia = default,
+ global::System.Collections.Generic.Dictionary>? addMedia = default,
global::System.Collections.Generic.IList? addCompositions = default,
string? callbackUrl = default,
global::System.Threading.CancellationToken cancellationToken = default)
diff --git a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ImportProjectMedia.g.cs b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ImportProjectMedia.g.cs
index 292755a..af7aa25 100644
--- a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ImportProjectMedia.g.cs
+++ b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ImportProjectMedia.g.cs
@@ -19,7 +19,7 @@ public partial interface IApiEndpointsClient
/// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
/// - [Supported file types](https://help.descript.com/hc/en-us/articles/10164098416909-Supported-file-types)
/// ### Direct file upload
- /// **[Work in progress]** Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
/// ### Async Operations
/// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
/// ### Dynamic webhook
@@ -48,7 +48,7 @@ public partial interface IApiEndpointsClient
/// - Recommended to sign URLs for 12-48 hours to reduce chance of failure
/// - [Supported file types](https://help.descript.com/hc/en-us/articles/10164098416909-Supported-file-types)
/// ### Direct file upload
- /// **[Work in progress]** Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
+ /// Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.
/// ### Async Operations
/// Imports run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.
/// ### Dynamic webhook
@@ -95,7 +95,7 @@ public partial interface IApiEndpointsClient
global::System.Guid? projectId = default,
string? projectName = default,
global::Descript.ImportProjectMediaRequestTeamAccess? teamAccess = default,
- global::System.Collections.Generic.Dictionary>? addMedia = default,
+ global::System.Collections.Generic.Dictionary>? addMedia = default,
global::System.Collections.Generic.IList? addCompositions = default,
string? callbackUrl = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.OneOf2.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.OneOf3.g.cs
similarity index 69%
rename from src/libs/Descript/Generated/Descript.JsonConverters.OneOf2.g.cs
rename to src/libs/Descript/Generated/Descript.JsonConverters.OneOf3.g.cs
index 6f083b8..89f99b8 100644
--- a/src/libs/Descript/Generated/Descript.JsonConverters.OneOf2.g.cs
+++ b/src/libs/Descript/Generated/Descript.JsonConverters.OneOf3.g.cs
@@ -3,10 +3,10 @@
namespace Descript.JsonConverters
{
///
- public class OneOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2> : global::System.Text.Json.Serialization.JsonConverter>
+ public class OneOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T3> : global::System.Text.Json.Serialization.JsonConverter>
{
///
- public override global::Descript.OneOf Read(
+ public override global::Descript.OneOf Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -48,13 +48,26 @@ public class OneOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.Dynamic
}
}
}
+ var __score2 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T3), options);
+ if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
+ {
+ foreach (var __prop in __ti.Properties)
+ {
+ if (__jsonProps.Contains(__prop.Name)) __score2++;
+ }
+ }
+ }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+ if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; }
T1? value1 = default;
T2? value2 = default;
+ T3? value3 = default;
if (__bestIndex >= 0)
{
if (__bestIndex == 0)
@@ -90,9 +103,26 @@ public class OneOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.Dynamic
{
}
}
+
+ else if (__bestIndex == 2)
+ {
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
}
- if (value1 == null && value2 == null)
+ if (value1 == null && value2 == null && value3 == null)
{
try
{
@@ -121,12 +151,28 @@ public class OneOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.Dynamic
catch (global::System.InvalidOperationException)
{
}
+
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
}
- var __value = new global::Descript.OneOf(
+ var __value = new global::Descript.OneOf(
value1,
- value2
+ value2,
+
+ value3
);
return __value;
@@ -135,7 +181,7 @@ public class OneOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.Dynamic
///
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
- global::Descript.OneOf value,
+ global::Descript.OneOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
@@ -153,6 +199,12 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
}
+ else if (value.IsValue3)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo);
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs b/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs
index 7e5f8ed..48a8b1a 100644
--- a/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs
+++ b/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs
@@ -111,7 +111,7 @@ namespace Descript
typeof(global::Descript.JsonConverters.JobStatusJsonConverter),
- typeof(global::Descript.JsonConverters.OneOfJsonConverter),
+ typeof(global::Descript.JsonConverters.OneOfJsonConverter),
typeof(global::Descript.JsonConverters.UnixTimestampJsonConverter),
})]
@@ -181,9 +181,10 @@ namespace Descript
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.JobStatusDiscriminatorJobType), TypeInfoPropertyName = "JobStatusDiscriminatorJobType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportProjectMediaRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportProjectMediaRequestTeamAccess), TypeInfoPropertyName = "ImportProjectMediaRequestTeamAccess2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary>))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.OneOf), TypeInfoPropertyName = "OneOfImportProjectMediaRequestAddMediaUrlImportImportProjectMediaRequestAddMediaMultitrackSequence2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary>), TypeInfoPropertyName = "ImportProjectMediaRequestAddMediaMultitrackSequence_be431db9011ff791")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.OneOf), TypeInfoPropertyName = "ImportProjectMediaRequestAddMediaMultitrackSequence_dc92f0bae16ba1fc")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportProjectMediaRequestAddMediaUrlImport))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportProjectMediaRequestAddMediaDirectUpload))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequence))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequenceTrack))]
@@ -195,6 +196,8 @@ namespace Descript
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentEditJobRequestTeamAccess), TypeInfoPropertyName = "AgentEditJobRequestTeamAccess2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListJobsType), TypeInfoPropertyName = "ListJobsType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportProjectMediaResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportProjectMediaResponseUploadUrls2))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentEditJobResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListJobsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
diff --git a/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs b/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs
index f62f2b7..163c483 100644
--- a/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs
@@ -288,11 +288,11 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Descript.OneOf? Type65 { get; set; }
+ public global::Descript.ImportProjectMediaRequestAddMediaUrlImport? Type65 { get; set; }
///
///
///
- public global::Descript.ImportProjectMediaRequestAddMediaUrlImport? Type66 { get; set; }
+ public global::Descript.ImportProjectMediaRequestAddMediaDirectUpload? Type66 { get; set; }
///
///
///
@@ -340,27 +340,35 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Descript.AgentEditJobResponse? Type78 { get; set; }
+ public global::System.Collections.Generic.Dictionary? Type78 { get; set; }
///
///
///
- public global::Descript.ListJobsResponse? Type79 { get; set; }
+ public global::Descript.ImportProjectMediaResponseUploadUrls2? Type79 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type80 { get; set; }
+ public global::Descript.AgentEditJobResponse? Type80 { get; set; }
///
///
///
- public global::Descript.ListJobsResponsePagination? Type81 { get; set; }
+ public global::Descript.ListJobsResponse? Type81 { get; set; }
///
///
///
- public global::Descript.GetStatusResponse? Type82 { get; set; }
+ public global::System.Collections.Generic.IList? Type82 { get; set; }
///
///
///
- public global::Descript.GetStatusResponseStatus? Type83 { get; set; }
+ public global::Descript.ListJobsResponsePagination? Type83 { get; set; }
+ ///
+ ///
+ ///
+ public global::Descript.GetStatusResponse? Type84 { get; set; }
+ ///
+ ///
+ ///
+ public global::Descript.GetStatusResponseStatus? Type85 { get; set; }
///
///
diff --git a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequest.g.cs b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequest.g.cs
index 4dfea03..daeceae 100644
--- a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequest.g.cs
+++ b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequest.g.cs
@@ -54,7 +54,7 @@ public sealed partial class ImportProjectMediaRequest
///
/// {"Misc/intro.mp4":{"url":"https://example.com/intro.mp4"},"demo.mp4":{"url":"https://example.com/demo.mp4"},"Multicam_Track":{"tracks":[{"media":"Recordings/camera1.mp4","offset":0},{"media":"Recordings/camera2.mp4","offset":50}]}}
[global::System.Text.Json.Serialization.JsonPropertyName("add_media")]
- public global::System.Collections.Generic.Dictionary>? AddMedia { get; set; }
+ public global::System.Collections.Generic.Dictionary>? AddMedia { get; set; }
///
/// Optional list of compositions to create in the project
@@ -121,7 +121,7 @@ public ImportProjectMediaRequest(
global::System.Guid? projectId,
string? projectName,
global::Descript.ImportProjectMediaRequestTeamAccess? teamAccess,
- global::System.Collections.Generic.Dictionary>? addMedia,
+ global::System.Collections.Generic.Dictionary>? addMedia,
global::System.Collections.Generic.IList? addCompositions,
string? callbackUrl)
{
diff --git a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequestAddMediaDirectUpload.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequestAddMediaDirectUpload.Json.g.cs
new file mode 100644
index 0000000..3151791
--- /dev/null
+++ b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequestAddMediaDirectUpload.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Descript
+{
+ public sealed partial class ImportProjectMediaRequestAddMediaDirectUpload
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Descript.ImportProjectMediaRequestAddMediaDirectUpload? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Descript.ImportProjectMediaRequestAddMediaDirectUpload),
+ jsonSerializerContext) as global::Descript.ImportProjectMediaRequestAddMediaDirectUpload;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Descript.ImportProjectMediaRequestAddMediaDirectUpload? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Descript.ImportProjectMediaRequestAddMediaDirectUpload),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Descript.ImportProjectMediaRequestAddMediaDirectUpload;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequestAddMediaDirectUpload.g.cs b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequestAddMediaDirectUpload.g.cs
new file mode 100644
index 0000000..c2448d7
--- /dev/null
+++ b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaRequestAddMediaDirectUpload.g.cs
@@ -0,0 +1,82 @@
+
+#nullable enable
+
+namespace Descript
+{
+ ///
+ /// Upload a file directly to Descript. The API returns a signed upload URL
+ /// in the response. PUT your file to that URL, then the import job will
+ /// process it automatically.
+ ///
+ public sealed partial class ImportProjectMediaRequestAddMediaDirectUpload
+ {
+ ///
+ /// MIME type of the file (e.g., "video/mp4", "audio/wav")
+ /// Example: video/mp4
+ ///
+ /// video/mp4
+ [global::System.Text.Json.Serialization.JsonPropertyName("content_type")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string ContentType { get; set; }
+
+ ///
+ /// File size in bytes
+ /// Example: 52428800
+ ///
+ /// 52428800
+ [global::System.Text.Json.Serialization.JsonPropertyName("file_size")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int FileSize { get; set; }
+
+ ///
+ /// ISO 639-1 language code for transcription (e.g., "en", "es", "fr").
+ /// If not specified, language is auto-detected from the audio.
+ /// Example: en
+ ///
+ /// en
+ [global::System.Text.Json.Serialization.JsonPropertyName("language")]
+ public string? Language { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// MIME type of the file (e.g., "video/mp4", "audio/wav")
+ /// Example: video/mp4
+ ///
+ ///
+ /// File size in bytes
+ /// Example: 52428800
+ ///
+ ///
+ /// ISO 639-1 language code for transcription (e.g., "en", "es", "fr").
+ /// If not specified, language is auto-detected from the audio.
+ /// Example: en
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public ImportProjectMediaRequestAddMediaDirectUpload(
+ string contentType,
+ int fileSize,
+ string? language)
+ {
+ this.ContentType = contentType ?? throw new global::System.ArgumentNullException(nameof(contentType));
+ this.FileSize = fileSize;
+ this.Language = language;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ImportProjectMediaRequestAddMediaDirectUpload()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponse.g.cs b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponse.g.cs
index 5fe3af8..bf33c7a 100644
--- a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponse.g.cs
+++ b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponse.g.cs
@@ -44,6 +44,15 @@ public sealed partial class ImportProjectMediaResponse
[global::System.Text.Json.Serialization.JsonRequired]
public required string ProjectUrl { get; set; }
+ ///
+ /// Signed upload URLs for each direct upload media item. Only present when the request
+ /// includes direct upload references. PUT the file contents to the `upload_url` with
+ /// `Content-Type: application/octet-stream`. The import job will automatically detect
+ /// the upload and process the file.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("upload_urls")]
+ public global::System.Collections.Generic.Dictionary? UploadUrls { get; set; }
+
///
/// Additional properties that are not explicitly defined in the schema
///
@@ -69,6 +78,12 @@ public sealed partial class ImportProjectMediaResponse
/// URL to access the project in Descript web app
/// Example: https://web.descript.com/9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb
///
+ ///
+ /// Signed upload URLs for each direct upload media item. Only present when the request
+ /// includes direct upload references. PUT the file contents to the `upload_url` with
+ /// `Content-Type: application/octet-stream`. The import job will automatically detect
+ /// the upload and process the file.
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
@@ -76,12 +91,14 @@ public ImportProjectMediaResponse(
global::System.Guid jobId,
global::System.Guid driveId,
global::System.Guid projectId,
- string projectUrl)
+ string projectUrl,
+ global::System.Collections.Generic.Dictionary? uploadUrls)
{
this.JobId = jobId;
this.DriveId = driveId;
this.ProjectId = projectId;
this.ProjectUrl = projectUrl ?? throw new global::System.ArgumentNullException(nameof(projectUrl));
+ this.UploadUrls = uploadUrls;
}
///
diff --git a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls.Json.g.cs
new file mode 100644
index 0000000..9f85130
--- /dev/null
+++ b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Descript
+{
+ public sealed partial class ImportProjectMediaResponseUploadUrls
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Descript.ImportProjectMediaResponseUploadUrls? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Descript.ImportProjectMediaResponseUploadUrls),
+ jsonSerializerContext) as global::Descript.ImportProjectMediaResponseUploadUrls;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Descript.ImportProjectMediaResponseUploadUrls? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Descript.ImportProjectMediaResponseUploadUrls),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Descript.ImportProjectMediaResponseUploadUrls;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls.g.cs b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls.g.cs
new file mode 100644
index 0000000..656faf6
--- /dev/null
+++ b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls.g.cs
@@ -0,0 +1,21 @@
+
+#nullable enable
+
+namespace Descript
+{
+ ///
+ /// Signed upload URLs for each direct upload media item. Only present when the request
+ /// includes direct upload references. PUT the file contents to the `upload_url` with
+ /// `Content-Type: application/octet-stream`. The import job will automatically detect
+ /// the upload and process the file.
+ ///
+ public sealed partial class ImportProjectMediaResponseUploadUrls
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls2.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls2.Json.g.cs
new file mode 100644
index 0000000..e46a1ba
--- /dev/null
+++ b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls2.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Descript
+{
+ public sealed partial class ImportProjectMediaResponseUploadUrls2
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Descript.ImportProjectMediaResponseUploadUrls2? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Descript.ImportProjectMediaResponseUploadUrls2),
+ jsonSerializerContext) as global::Descript.ImportProjectMediaResponseUploadUrls2;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Descript.ImportProjectMediaResponseUploadUrls2? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Descript.ImportProjectMediaResponseUploadUrls2),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Descript.ImportProjectMediaResponseUploadUrls2;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls2.g.cs b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls2.g.cs
new file mode 100644
index 0000000..917f263
--- /dev/null
+++ b/src/libs/Descript/Generated/Descript.Models.ImportProjectMediaResponseUploadUrls2.g.cs
@@ -0,0 +1,70 @@
+
+#nullable enable
+
+namespace Descript
+{
+ ///
+ ///
+ ///
+ public sealed partial class ImportProjectMediaResponseUploadUrls2
+ {
+ ///
+ /// Signed URL to PUT the file to. Expires after 3 hours.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("upload_url")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string UploadUrl { get; set; }
+
+ ///
+ /// GAT asset ID for the uploaded file
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("asset_id")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Guid AssetId { get; set; }
+
+ ///
+ /// GAT artifact ID for the uploaded file
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("artifact_id")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Guid ArtifactId { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Signed URL to PUT the file to. Expires after 3 hours.
+ ///
+ ///
+ /// GAT asset ID for the uploaded file
+ ///
+ ///
+ /// GAT artifact ID for the uploaded file
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public ImportProjectMediaResponseUploadUrls2(
+ string uploadUrl,
+ global::System.Guid assetId,
+ global::System.Guid artifactId)
+ {
+ this.UploadUrl = uploadUrl ?? throw new global::System.ArgumentNullException(nameof(uploadUrl));
+ this.AssetId = assetId;
+ this.ArtifactId = artifactId;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ImportProjectMediaResponseUploadUrls2()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Descript/Generated/Descript.OneOf.2.Json.g.cs b/src/libs/Descript/Generated/Descript.OneOf.3.Json.g.cs
similarity index 88%
rename from src/libs/Descript/Generated/Descript.OneOf.2.Json.g.cs
rename to src/libs/Descript/Generated/Descript.OneOf.3.Json.g.cs
index 919eb20..1479510 100644
--- a/src/libs/Descript/Generated/Descript.OneOf.2.Json.g.cs
+++ b/src/libs/Descript/Generated/Descript.OneOf.3.Json.g.cs
@@ -2,7 +2,7 @@
namespace Descript
{
- public readonly partial struct OneOf
+ public readonly partial struct OneOf
{
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
@@ -34,14 +34,14 @@ public string ToJson(
///
/// Deserializes a JSON string using the provided JsonSerializerContext.
///
- public static global::Descript.OneOf? FromJson(
+ public static global::Descript.OneOf? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
- typeof(global::Descript.OneOf),
- jsonSerializerContext) as global::Descript.OneOf?;
+ typeof(global::Descript.OneOf),
+ jsonSerializerContext) as global::Descript.OneOf?;
}
///
@@ -51,11 +51,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::Descript.OneOf? FromJson(
+ public static global::Descript.OneOf? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.Deserialize>(
+ return global::System.Text.Json.JsonSerializer.Deserialize>(
json,
jsonSerializerOptions);
}
@@ -63,14 +63,14 @@ public string ToJson(
///
/// Deserializes a JSON stream using the provided JsonSerializerContext.
///
- public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
+ public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
- typeof(global::Descript.OneOf),
- jsonSerializerContext).ConfigureAwait(false)) as global::Descript.OneOf?;
+ typeof(global::Descript.OneOf),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Descript.OneOf?;
}
///
@@ -80,11 +80,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
+ public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync?>(
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync?>(
jsonStream,
jsonSerializerOptions);
}
diff --git a/src/libs/Descript/Generated/Descript.OneOf.2.g.cs b/src/libs/Descript/Generated/Descript.OneOf.3.g.cs
similarity index 64%
rename from src/libs/Descript/Generated/Descript.OneOf.2.g.cs
rename to src/libs/Descript/Generated/Descript.OneOf.3.g.cs
index 17fa151..5b0ec86 100644
--- a/src/libs/Descript/Generated/Descript.OneOf.2.g.cs
+++ b/src/libs/Descript/Generated/Descript.OneOf.3.g.cs
@@ -6,7 +6,7 @@ namespace Descript
///
///
///
- public readonly partial struct OneOf : global::System.IEquatable>
+ public readonly partial struct OneOf : global::System.IEquatable>
{
///
///
@@ -41,15 +41,32 @@ namespace Descript
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
#endif
public bool IsValue2 => Value2 != null;
+
+ ///
+ ///
+ ///
+#if NET6_0_OR_GREATER
+ public T3? Value3 { get; init; }
+#else
+ public T3? Value3 { get; }
+#endif
+
///
///
///
- public static implicit operator OneOf(T1 value) => new OneOf((T1?)value);
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))]
+#endif
+ public bool IsValue3 => Value3 != null;
+ ///
+ ///
+ ///
+ public static implicit operator OneOf(T1 value) => new OneOf((T1?)value);
///
///
///
- public static implicit operator T1?(OneOf @this) => @this.Value1;
+ public static implicit operator T1?(OneOf @this) => @this.Value1;
///
///
@@ -62,12 +79,12 @@ public OneOf(T1? value)
///
///
///
- public static implicit operator OneOf(T2 value) => new OneOf((T2?)value);
+ public static implicit operator OneOf(T2 value) => new OneOf((T2?)value);
///
///
///
- public static implicit operator T2?(OneOf @this) => @this.Value2;
+ public static implicit operator T2?(OneOf @this) => @this.Value2;
///
///
@@ -77,22 +94,43 @@ public OneOf(T2? value)
Value2 = value;
}
+ ///
+ ///
+ ///
+ public static implicit operator OneOf(T3 value) => new OneOf((T3?)value);
+
+ ///
+ ///
+ ///
+ public static implicit operator T3?(OneOf @this) => @this.Value3;
+
+ ///
+ ///
+ ///
+ public OneOf(T3? value)
+ {
+ Value3 = value;
+ }
+
///
///
///
public OneOf(
T1? value1,
- T2? value2
+ T2? value2,
+ T3? value3
)
{
Value1 = value1;
Value2 = value2;
+ Value3 = value3;
}
///
///
///
public object? Object =>
+ Value3 as object ??
Value2 as object ??
Value1 as object
;
@@ -102,7 +140,8 @@ Value1 as object
///
public override string? ToString() =>
Value1?.ToString() ??
- Value2?.ToString()
+ Value2?.ToString() ??
+ Value3?.ToString()
;
///
@@ -110,7 +149,7 @@ Value1 as object
///
public bool Validate()
{
- return IsValue1 && !IsValue2 || !IsValue1 && IsValue2;
+ return IsValue1 && !IsValue2 && !IsValue3 || !IsValue1 && IsValue2 && !IsValue3 || !IsValue1 && !IsValue2 && IsValue3;
}
///
@@ -119,6 +158,7 @@ public bool Validate()
public TResult? Match(
global::System.Func? value1 = null,
global::System.Func? value2 = null,
+ global::System.Func? value3 = null,
bool validate = true)
{
if (validate)
@@ -134,6 +174,10 @@ public bool Validate()
{
return value2(Value2!);
}
+ else if (IsValue3 && value3 != null)
+ {
+ return value3(Value3!);
+ }
return default(TResult);
}
@@ -144,6 +188,7 @@ public bool Validate()
public void Match(
global::System.Action? value1 = null,
global::System.Action? value2 = null,
+ global::System.Action? value3 = null,
bool validate = true)
{
if (validate)
@@ -159,6 +204,10 @@ public void Match(
{
value2?.Invoke(Value2!);
}
+ else if (IsValue3)
+ {
+ value3?.Invoke(Value3!);
+ }
}
///
@@ -172,6 +221,8 @@ public override int GetHashCode()
typeof(T1),
Value2,
typeof(T2),
+ Value3,
+ typeof(T3),
};
const int offset = unchecked((int)2166136261);
const int prime = 16777619;
@@ -185,26 +236,27 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null
///
///
///
- public bool Equals(OneOf other)
+ public bool Equals(OneOf other)
{
return
global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) &&
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2)
+ global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) &&
+ global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3)
;
}
///
///
///
- public static bool operator ==(OneOf obj1, OneOf obj2)
+ public static bool operator ==(OneOf obj1, OneOf obj2)
{
- return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2);
+ return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2);
}
///
///
///
- public static bool operator !=(OneOf obj1, OneOf obj2)
+ public static bool operator !=(OneOf obj1, OneOf obj2)
{
return !(obj1 == obj2);
}
@@ -214,7 +266,7 @@ public bool Equals(OneOf other)
///
public override bool Equals(object? obj)
{
- return obj is OneOf o && Equals(o);
+ return obj is OneOf o && Equals(o);
}
}
}
diff --git a/src/libs/Descript/openapi.yaml b/src/libs/Descript/openapi.yaml
index a8f0e49..7c08fc1 100644
--- a/src/libs/Descript/openapi.yaml
+++ b/src/libs/Descript/openapi.yaml
@@ -73,6 +73,114 @@ tags:
Run `descript-api help` to see the full list of available commands and options.
- name: API Endpoints
description: Import media, edit projects with AI, and query jobs and projects.
+ - name: Direct file upload
+ description: |
+ Instead of providing a public URL, you can upload files directly from your local machine using the [import endpoint](#operation/importProjectMedia). The flow has three steps: request signed upload URLs, PUT your file bytes, then poll for completion.
+
+ ## Step 1 — Request upload URLs
+
+ Call the import endpoint with `content_type` and `file_size` instead of `url` for each media item you want to upload directly.
+
+ **Request**
+
+ ```bash
+ curl -X POST https://descriptapi.com/v1/jobs/import/project_media \
+ -H "Authorization: Bearer YOUR_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "project_name": "My Upload Project",
+ "add_media": {
+ "recording.mp4": {
+ "content_type": "video/mp4",
+ "file_size": 52428800
+ }
+ },
+ "add_compositions": [
+ {
+ "name": "Main",
+ "clips": [
+ { "media": "recording.mp4" }
+ ]
+ }
+ ]
+ }'
+ ```
+
+ The response includes an `upload_urls` object keyed by media reference ID. Each entry contains a signed `upload_url` (valid for 3 hours), plus `asset_id` and `artifact_id` for the created asset.
+
+ **Response**
+
+ ```json
+ {
+ "job_id": "project-media-import-a1b2c3d4",
+ "drive_id": "c9c5c47e",
+ "project_id": "e2f89ce6",
+ "project_url": "https://web.descript.com/e2f89ce6",
+ "upload_urls": {
+ "recording.mp4": {
+ "upload_url": "https://storage.googleapis.com/bucket/...",
+ "asset_id": "d4e5f6a7-1234-5678-9abc-def012345678",
+ "artifact_id": "a1b2c3d4-5678-9abc-def0-123456789abc"
+ }
+ }
+ }
+ ```
+
+ ## Step 2 — Upload the file
+
+ PUT the raw file bytes to the signed URL. Use `Content-Type: application/octet-stream`.
+
+ ```bash
+ curl -X PUT \
+ -H "Content-Type: application/octet-stream" \
+ --data-binary @recording.mp4 \
+ "https://storage.googleapis.com/bucket/..."
+ ```
+
+ The import job detects the upload automatically and begins processing.
+
+ ## Step 3 — Poll for completion
+
+ Check the job status the same way as a URL-based import — poll the [job status endpoint](#operation/getJob) with the `job_id`, or provide a `callback_url` in the original request.
+
+ ```bash
+ curl https://descriptapi.com/v1/jobs/project-media-import-a1b2c3d4 \
+ -H "Authorization: Bearer YOUR_API_TOKEN"
+ ```
+
+ When the job reaches `job_state: "stopped"`, check `result.status` for success or failure.
+
+ ## Mixing URL imports and direct uploads
+
+ You can combine URL-based and direct upload media items in a single request. Items with `url` are fetched server-side; items with `content_type` and `file_size` return signed upload URLs.
+
+ ```bash
+ curl -X POST https://descriptapi.com/v1/jobs/import/project_media \
+ -H "Authorization: Bearer YOUR_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "project_name": "Mixed Import",
+ "add_media": {
+ "intro.mp4": {
+ "url": "https://example.com/intro.mp4"
+ },
+ "recording.mp4": {
+ "content_type": "video/mp4",
+ "file_size": 52428800
+ }
+ }
+ }'
+ ```
+
+ The response will include `upload_urls` only for the direct upload items.
+
+ ## Required fields
+
+ | Field | Type | Description |
+ |-------|------|-------------|
+ | `content_type` | string | MIME type of the file (e.g., `video/mp4`, `audio/wav`) |
+ | `file_size` | integer | File size in bytes |
+ | `language` | string | *(optional)* ISO 639-1 language code for transcription. Auto-detected if omitted. |
- name: Authentication
description: |
The Descript API uses personal API tokens to authenticate requests. Tokens are scoped to a specific Drive and inherit your permissions on that Drive.
@@ -177,7 +285,7 @@ paths:
summary: Import media and sequences
security:
- bearerAuth: []
- description: "Import media files into a new or existing project and create compositions.\n\nThis endpoint can:\n- Create a new project if `project_id` is not provided\n- Import media files from URLs\n- Create multitrack sequences\n- Create compositions (timelines) from existing or new media in the project\n- Trigger transcription and other background processing tasks\n\n### Media URL requirements\n- URLs must be accessible by Descript servers\n- URLs must support HTTP Range requests\n- Recommended to sign URLs for 12-48 hours to reduce chance of failure\n- [Supported file types](https://help.descript.com/hc/en-us/articles/10164098416909-Supported-file-types)\n\n### Direct file upload\n\n**[Work in progress]** Instead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.\n\n### Async Operations\n\nImports\_run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.\n\n### Dynamic webhook\n\nIf `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not).\n\nThe payload will match the format returned by [GET /jobs/{job_id}](#operation/getJob).\n"
+ description: "Import media files into a new or existing project and create compositions.\n\nThis endpoint can:\n- Create a new project if `project_id` is not provided\n- Import media files from URLs\n- Create multitrack sequences\n- Create compositions (timelines) from existing or new media in the project\n- Trigger transcription and other background processing tasks\n\n### Media URL requirements\n- URLs must be accessible by Descript servers\n- URLs must support HTTP Range requests\n- Recommended to sign URLs for 12-48 hours to reduce chance of failure\n- [Supported file types](https://help.descript.com/hc/en-us/articles/10164098416909-Supported-file-types)\n\n### Direct file upload\n\nInstead of providing a URL, you can upload files directly by specifying `content_type` and `file_size` for a media item. The response will include a signed `upload_url` for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the [Direct file upload](#tag/Direct-file-upload) guide for a full walkthrough.\n\n### Async Operations\n\nImports\_run in the background and return a `job_id`. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.\n\n### Dynamic webhook\n\nIf `callback_url` is provided, Descript will POST the job status to that URL when the job finishes (successfully or not).\n\nThe payload will match the format returned by [GET /jobs/{job_id}](#operation/getJob).\n"
operationId: importProjectMedia
requestBody:
content:
@@ -252,6 +360,31 @@ paths:
If not specified, language is auto-detected from the audio.
example: en
additionalProperties: false
+ - type: object
+ title: Direct Upload
+ description: |
+ Upload a file directly to Descript. The API returns a signed upload URL
+ in the response. PUT your file to that URL, then the import job will
+ process it automatically.
+ required:
+ - content_type
+ - file_size
+ properties:
+ content_type:
+ type: string
+ description: MIME type of the file (e.g., "video/mp4", "audio/wav")
+ example: video/mp4
+ file_size:
+ type: integer
+ description: File size in bytes
+ example: 52428800
+ language:
+ type: string
+ description: |
+ ISO 639-1 language code for transcription (e.g., "en", "es", "fr").
+ If not specified, language is auto-detected from the audio.
+ example: en
+ additionalProperties: false
- type: object
title: Multitrack Sequence
description: Create a multitrack sequence from multiple media files
@@ -373,6 +506,19 @@ paths:
url: https://example.com/intro.mp4
Assets/logo.png:
url: https://example.com/logo.png
+ direct_upload:
+ summary: Direct file upload
+ description: Upload a local file directly instead of providing a URL
+ value:
+ project_name: Upload Project
+ add_media:
+ recording.mp4:
+ content_type: video/mp4
+ file_size: 52428800
+ add_compositions:
+ - name: Main
+ clips:
+ - media: recording.mp4
multitrack_sequence:
summary: Create multitrack sequence
description: Combine multiple tracks with time offsets
@@ -429,6 +575,32 @@ paths:
format: uri
description: URL to access the project in Descript web app
example: https://web.descript.com/9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb
+ upload_urls:
+ type: object
+ description: |
+ Signed upload URLs for each direct upload media item. Only present when the request
+ includes direct upload references. PUT the file contents to the `upload_url` with
+ `Content-Type: application/octet-stream`. The import job will automatically detect
+ the upload and process the file.
+ additionalProperties:
+ type: object
+ properties:
+ upload_url:
+ type: string
+ format: uri
+ description: Signed URL to PUT the file to. Expires after 3 hours.
+ asset_id:
+ type: string
+ format: uuid
+ description: GAT asset ID for the uploaded file
+ artifact_id:
+ type: string
+ format: uuid
+ description: GAT artifact ID for the uploaded file
+ required:
+ - upload_url
+ - asset_id
+ - artifact_id
required:
- job_id
- drive_id