diff --git a/src/cli/Descript.CLI/Commands/ApiEndpointsGetProjectCommandApiCommand.g.cs b/src/cli/Descript.CLI/Commands/ApiEndpointsGetProjectCommandApiCommand.g.cs index d16bec5..8197fed 100644 --- a/src/cli/Descript.CLI/Commands/ApiEndpointsGetProjectCommandApiCommand.g.cs +++ b/src/cli/Descript.CLI/Commands/ApiEndpointsGetProjectCommandApiCommand.g.cs @@ -36,13 +36,16 @@ private static string FormatResponse(ParseResult parseResult, global::Descript.G public static Command Create() { var command = new Command(@"get-project", @"Get project details -Get a detailed project summary including all media files and compositions. +Get a detailed project summary including all media files, compositions, +and existing publishes. Returns the project's id, name, drive_id, a map of media files (keyed by -display path) with type and duration, and a list of compositions with id, -name, duration, and media type. +display path) with type and duration, a list of compositions with id, +name, duration, and media type, and a list of successfully published +share pages with their URLs, access levels, and publish times. -Use this to inspect a project's contents before editing or importing media. +Use this to inspect a project's contents before editing or importing media, +or to retrieve existing share URLs without triggering a republish. "); command.Arguments.Add(ProjectId); @@ -59,20 +62,12 @@ await CliRuntime.RunAsync(async () => cancellationToken: cancellationToken).ConfigureAwait(false); - if (!await CliRuntime.TryWriteOutputDirectoryAsync( - parseResult, - response, - global::Descript.SourceGenerationContext.Default, - @"Compositions", - cancellationToken).ConfigureAwait(false)) - { await CliRuntime.WriteResponseAsync( parseResult, response, global::Descript.SourceGenerationContext.Default, FormatResponse, cancellationToken).ConfigureAwait(false); - } }, cancellationToken).ConfigureAwait(false)); return command; } diff --git a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.GetProject.g.cs b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.GetProject.g.cs index 195130e..19c2cee 100644 --- a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.GetProject.g.cs +++ b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.GetProject.g.cs @@ -43,11 +43,14 @@ partial void ProcessGetProjectResponseContent( /// /// Get project details
- /// Get a detailed project summary including all media files and compositions.
+ /// Get a detailed project summary including all media files, compositions,
+ /// and existing publishes.
/// Returns the project's id, name, drive_id, a map of media files (keyed by
- /// display path) with type and duration, and a list of compositions with id,
- /// name, duration, and media type.
- /// Use this to inspect a project's contents before editing or importing media. + /// display path) with type and duration, a list of compositions with id,
+ /// name, duration, and media type, and a list of successfully published
+ /// share pages with their URLs, access levels, and publish times.
+ /// Use this to inspect a project's contents before editing or importing media,
+ /// or to retrieve existing share URLs without triggering a republish. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -68,11 +71,14 @@ partial void ProcessGetProjectResponseContent( } /// /// Get project details
- /// Get a detailed project summary including all media files and compositions.
+ /// Get a detailed project summary including all media files, compositions,
+ /// and existing publishes.
/// Returns the project's id, name, drive_id, a map of media files (keyed by
- /// display path) with type and duration, and a list of compositions with id,
- /// name, duration, and media type.
- /// Use this to inspect a project's contents before editing or importing media. + /// display path) with type and duration, a list of compositions with id,
+ /// name, duration, and media type, and a list of successfully published
+ /// share pages with their URLs, access levels, and publish times.
+ /// Use this to inspect a project's contents before editing or importing media,
+ /// or to retrieve existing share URLs without triggering a republish. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.GetProject.g.cs b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.GetProject.g.cs index 7adbccf..e0c3c05 100644 --- a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.GetProject.g.cs +++ b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.GetProject.g.cs @@ -6,11 +6,14 @@ public partial interface IApiEndpointsClient { /// /// Get project details
- /// Get a detailed project summary including all media files and compositions.
+ /// Get a detailed project summary including all media files, compositions,
+ /// and existing publishes.
/// Returns the project's id, name, drive_id, a map of media files (keyed by
- /// display path) with type and duration, and a list of compositions with id,
- /// name, duration, and media type.
- /// Use this to inspect a project's contents before editing or importing media. + /// display path) with type and duration, a list of compositions with id,
+ /// name, duration, and media type, and a list of successfully published
+ /// share pages with their URLs, access levels, and publish times.
+ /// Use this to inspect a project's contents before editing or importing media,
+ /// or to retrieve existing share URLs without triggering a republish. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -22,11 +25,14 @@ public partial interface IApiEndpointsClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Get project details
- /// Get a detailed project summary including all media files and compositions.
+ /// Get a detailed project summary including all media files, compositions,
+ /// and existing publishes.
/// Returns the project's id, name, drive_id, a map of media files (keyed by
- /// display path) with type and duration, and a list of compositions with id,
- /// name, duration, and media type.
- /// Use this to inspect a project's contents before editing or importing media. + /// display path) with type and duration, a list of compositions with id,
+ /// name, duration, and media type, and a list of successfully published
+ /// share pages with their URLs, access levels, and publish times.
+ /// Use this to inspect a project's contents before editing or importing media,
+ /// or to retrieve existing share URLs without triggering a republish. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheAccessLevel.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheAccessLevel.g.cs new file mode 100644 index 0000000..7e920a3 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheAccessLevel.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class GetProjectResponsePublisheAccessLevelJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.GetProjectResponsePublisheAccessLevel Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Descript.GetProjectResponsePublisheAccessLevelExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.GetProjectResponsePublisheAccessLevel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.GetProjectResponsePublisheAccessLevel); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.GetProjectResponsePublisheAccessLevel value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Descript.GetProjectResponsePublisheAccessLevelExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheAccessLevelNullable.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheAccessLevelNullable.g.cs new file mode 100644 index 0000000..231e45d --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheAccessLevelNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class GetProjectResponsePublisheAccessLevelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.GetProjectResponsePublisheAccessLevel? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Descript.GetProjectResponsePublisheAccessLevelExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.GetProjectResponsePublisheAccessLevel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.GetProjectResponsePublisheAccessLevel?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.GetProjectResponsePublisheAccessLevel? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Descript.GetProjectResponsePublisheAccessLevelExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheMediaType.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheMediaType.g.cs new file mode 100644 index 0000000..1ea553f --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheMediaType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class GetProjectResponsePublisheMediaTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.GetProjectResponsePublisheMediaType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Descript.GetProjectResponsePublisheMediaTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.GetProjectResponsePublisheMediaType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.GetProjectResponsePublisheMediaType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.GetProjectResponsePublisheMediaType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Descript.GetProjectResponsePublisheMediaTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheMediaTypeNullable.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheMediaTypeNullable.g.cs new file mode 100644 index 0000000..b3bdba1 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.GetProjectResponsePublisheMediaTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class GetProjectResponsePublisheMediaTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.GetProjectResponsePublisheMediaType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Descript.GetProjectResponsePublisheMediaTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.GetProjectResponsePublisheMediaType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.GetProjectResponsePublisheMediaType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.GetProjectResponsePublisheMediaType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Descript.GetProjectResponsePublisheMediaTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs b/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs index 3b286f3..87c4805 100644 --- a/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs +++ b/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs @@ -165,6 +165,14 @@ namespace Descript typeof(global::Descript.JsonConverters.GetProjectResponseMediaFilesTypeNullableJsonConverter), + typeof(global::Descript.JsonConverters.GetProjectResponsePublisheAccessLevelJsonConverter), + + typeof(global::Descript.JsonConverters.GetProjectResponsePublisheAccessLevelNullableJsonConverter), + + typeof(global::Descript.JsonConverters.GetProjectResponsePublisheMediaTypeJsonConverter), + + typeof(global::Descript.JsonConverters.GetProjectResponsePublisheMediaTypeNullableJsonConverter), + typeof(global::Descript.JsonConverters.GetStatusResponseStatusJsonConverter), typeof(global::Descript.JsonConverters.GetStatusResponseStatusNullableJsonConverter), @@ -309,6 +317,10 @@ namespace Descript [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetProjectResponseMediaFilesType), TypeInfoPropertyName = "GetProjectResponseMediaFilesType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetProjectResponseComposition))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetProjectResponsePublishe))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetProjectResponsePublisheAccessLevel), TypeInfoPropertyName = "GetProjectResponsePublisheAccessLevel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetProjectResponsePublisheMediaType), TypeInfoPropertyName = "GetProjectResponsePublisheMediaType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetStatusResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetStatusResponseStatus), TypeInfoPropertyName = "GetStatusResponseStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.OneOf?), TypeInfoPropertyName = "ImportProjectMediaRequestAddMediaMultitrackSequence_a84f7d44496d84a5")] @@ -322,6 +334,7 @@ namespace Descript [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext { } diff --git a/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs b/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs index 02fdccf..03ae197 100644 --- a/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs +++ b/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs @@ -528,11 +528,27 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Descript.GetStatusResponse? Type125 { get; set; } + public global::System.Collections.Generic.IList? Type125 { get; set; } /// /// /// - public global::Descript.GetStatusResponseStatus? Type126 { get; set; } + public global::Descript.GetProjectResponsePublishe? Type126 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponsePublisheAccessLevel? Type127 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponsePublisheMediaType? Type128 { get; set; } + /// + /// + /// + public global::Descript.GetStatusResponse? Type129 { get; set; } + /// + /// + /// + public global::Descript.GetStatusResponseStatus? Type130 { get; set; } /// /// @@ -574,5 +590,9 @@ public sealed partial class JsonSerializerContextTypes /// /// public global::System.Collections.Generic.List? ListType9 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType10 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.GetProjectResponse.g.cs b/src/libs/Descript/Generated/Descript.Models.GetProjectResponse.g.cs index 94e5179..5f5c912 100644 --- a/src/libs/Descript/Generated/Descript.Models.GetProjectResponse.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.GetProjectResponse.g.cs @@ -65,6 +65,13 @@ public sealed partial class GetProjectResponse [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Compositions { get; set; } + /// + /// Successfully published share pages for this project. Each entry represents a composition that has been published and is accessible via its share_url. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("publishes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Publishes { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -95,6 +102,9 @@ public sealed partial class GetProjectResponse /// /// Compositions in the project /// + /// + /// Successfully published share pages for this project. Each entry represents a composition that has been published and is accessible via its share_url. + /// /// /// Full folder path for the project (e.g. "Clients/Acme/Videos"). Absent when the project is at the drive root.
/// Example: Clients/Acme/Videos @@ -110,6 +120,7 @@ public GetProjectResponse( global::System.DateTime updatedAt, global::System.Collections.Generic.Dictionary mediaFiles, global::System.Collections.Generic.IList compositions, + global::System.Collections.Generic.IList publishes, string? folderPath) { this.Id = id; @@ -120,6 +131,7 @@ public GetProjectResponse( this.FolderPath = folderPath; this.MediaFiles = mediaFiles ?? throw new global::System.ArgumentNullException(nameof(mediaFiles)); this.Compositions = compositions ?? throw new global::System.ArgumentNullException(nameof(compositions)); + this.Publishes = publishes ?? throw new global::System.ArgumentNullException(nameof(publishes)); } /// diff --git a/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublishe.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublishe.Json.g.cs new file mode 100644 index 0000000..cd1e9b6 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublishe.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class GetProjectResponsePublishe + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Descript.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.GetProjectResponsePublishe? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.GetProjectResponsePublishe), + jsonSerializerContext) as global::Descript.GetProjectResponsePublishe; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.GetProjectResponsePublishe? FromJson( + string json) + { + return FromJson( + json, + global::Descript.SourceGenerationContext.Default); + } + + /// + /// 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.GetProjectResponsePublishe? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.SourceGenerationContext.Default); + } + + 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.GetProjectResponsePublishe), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.GetProjectResponsePublishe; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Descript.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublishe.g.cs b/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublishe.g.cs new file mode 100644 index 0000000..0acde14 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublishe.g.cs @@ -0,0 +1,124 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class GetProjectResponsePublishe + { + /// + /// URL of the published share page
+ /// Example: https://share.descript.com/view/abc123 + ///
+ /// https://share.descript.com/view/abc123 + [global::System.Text.Json.Serialization.JsonPropertyName("share_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ShareUrl { get; set; } + + /// + /// ID of the composition that was published + /// + [global::System.Text.Json.Serialization.JsonPropertyName("composition_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Guid CompositionId { get; set; } + + /// + /// Access level of the published share page + /// + [global::System.Text.Json.Serialization.JsonPropertyName("access_level")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.GetProjectResponsePublisheAccessLevelJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Descript.GetProjectResponsePublisheAccessLevel AccessLevel { get; set; } + + /// + /// Media type of the published output + /// + [global::System.Text.Json.Serialization.JsonPropertyName("media_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.GetProjectResponsePublisheMediaTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Descript.GetProjectResponsePublisheMediaType MediaType { get; set; } + + /// + /// When the publish was created (ISO 8601) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("published_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime PublishedAt { get; set; } + + /// + /// When the publish was last updated (ISO 8601) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime UpdatedAt { get; set; } + + /// + /// Name of the published share page + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { 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. + /// + /// + /// URL of the published share page
+ /// Example: https://share.descript.com/view/abc123 + /// + /// + /// ID of the composition that was published + /// + /// + /// Access level of the published share page + /// + /// + /// Media type of the published output + /// + /// + /// When the publish was created (ISO 8601) + /// + /// + /// When the publish was last updated (ISO 8601) + /// + /// + /// Name of the published share page + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetProjectResponsePublishe( + string shareUrl, + global::System.Guid compositionId, + global::Descript.GetProjectResponsePublisheAccessLevel accessLevel, + global::Descript.GetProjectResponsePublisheMediaType mediaType, + global::System.DateTime publishedAt, + global::System.DateTime updatedAt, + string name) + { + this.ShareUrl = shareUrl ?? throw new global::System.ArgumentNullException(nameof(shareUrl)); + this.CompositionId = compositionId; + this.AccessLevel = accessLevel; + this.MediaType = mediaType; + this.PublishedAt = publishedAt; + this.UpdatedAt = updatedAt; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + } + + /// + /// Initializes a new instance of the class. + /// + public GetProjectResponsePublishe() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublisheAccessLevel.g.cs b/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublisheAccessLevel.g.cs new file mode 100644 index 0000000..01b3f13 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublisheAccessLevel.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace Descript +{ + /// + /// Access level of the published share page + /// + public enum GetProjectResponsePublisheAccessLevel + { + /// + /// + /// + Drive, + /// + /// + /// + Password, + /// + /// + /// + Private, + /// + /// + /// + Public, + /// + /// + /// + Unlisted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GetProjectResponsePublisheAccessLevelExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GetProjectResponsePublisheAccessLevel value) + { + return value switch + { + GetProjectResponsePublisheAccessLevel.Drive => "drive", + GetProjectResponsePublisheAccessLevel.Password => "password", + GetProjectResponsePublisheAccessLevel.Private => "private", + GetProjectResponsePublisheAccessLevel.Public => "public", + GetProjectResponsePublisheAccessLevel.Unlisted => "unlisted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GetProjectResponsePublisheAccessLevel? ToEnum(string value) + { + return value switch + { + "drive" => GetProjectResponsePublisheAccessLevel.Drive, + "password" => GetProjectResponsePublisheAccessLevel.Password, + "private" => GetProjectResponsePublisheAccessLevel.Private, + "public" => GetProjectResponsePublisheAccessLevel.Public, + "unlisted" => GetProjectResponsePublisheAccessLevel.Unlisted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublisheMediaType.g.cs b/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublisheMediaType.g.cs new file mode 100644 index 0000000..fac43cc --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.GetProjectResponsePublisheMediaType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Descript +{ + /// + /// Media type of the published output + /// + public enum GetProjectResponsePublisheMediaType + { + /// + /// + /// + Audio, + /// + /// + /// + Audiogram, + /// + /// + /// + Video, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GetProjectResponsePublisheMediaTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GetProjectResponsePublisheMediaType value) + { + return value switch + { + GetProjectResponsePublisheMediaType.Audio => "audio", + GetProjectResponsePublisheMediaType.Audiogram => "audiogram", + GetProjectResponsePublisheMediaType.Video => "video", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GetProjectResponsePublisheMediaType? ToEnum(string value) + { + return value switch + { + "audio" => GetProjectResponsePublisheMediaType.Audio, + "audiogram" => GetProjectResponsePublisheMediaType.Audiogram, + "video" => GetProjectResponsePublisheMediaType.Video, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/autosdk.generated-examples.json b/src/libs/Descript/Generated/autosdk.generated-examples.json index aa0a095..cc82bab 100644 --- a/src/libs/Descript/Generated/autosdk.generated-examples.json +++ b/src/libs/Descript/Generated/autosdk.generated-examples.json @@ -48,7 +48,7 @@ "Order": 5, "Title": "Get project details", "Slug": "getproject", - "Description": "Get a detailed project summary including all media files and compositions.\n\nReturns the project\u0027s id, name, drive_id, a map of media files (keyed by\ndisplay path) with type and duration, and a list of compositions with id,\nname, duration, and media type.\n\nUse this to inspect a project\u0027s contents before editing or importing media.", + "Description": "Get a detailed project summary including all media files, compositions,\nand existing publishes.\n\nReturns the project\u0027s id, name, drive_id, a map of media files (keyed by\ndisplay path) with type and duration, a list of compositions with id,\nname, duration, and media type, and a list of successfully published\nshare pages with their URLs, access levels, and publish times.\n\nUse this to inspect a project\u0027s contents before editing or importing media,\nor to retrieve existing share URLs without triggering a republish.", "Language": "http", "Code": "### Get project details\n# @name getProject\nGET {{host}}/projects/{{project_id}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Project details retrieved successfully\n# Content-Type: application/json\n# 400\n# Description: Bad request - \u0060project_id\u0060 is not a valid UUID\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - invalid or missing authentication token\n# Content-Type: application/json\n# 403\n# Description: Forbidden - user does not have access to this project\n# Content-Type: application/json\n# 404\n# Description: Project not found\n# Content-Type: application/json\n# 429\n# Description: Too many requests - rate limit exceeded.\nUse the \u0060Retry-After\u0060 header to determine when to retry.\n\n# Content-Type: application/json", "Format": "http", diff --git a/src/libs/Descript/openapi.yaml b/src/libs/Descript/openapi.yaml index bf3a7e4..d342651 100644 --- a/src/libs/Descript/openapi.yaml +++ b/src/libs/Descript/openapi.yaml @@ -2077,13 +2077,16 @@ paths: - API Endpoints summary: Get project details description: | - Get a detailed project summary including all media files and compositions. + Get a detailed project summary including all media files, compositions, + and existing publishes. Returns the project's id, name, drive_id, a map of media files (keyed by - display path) with type and duration, and a list of compositions with id, - name, duration, and media type. + display path) with type and duration, a list of compositions with id, + name, duration, and media type, and a list of successfully published + share pages with their URLs, access levels, and publish times. - Use this to inspect a project's contents before editing or importing media. + Use this to inspect a project's contents before editing or importing media, + or to retrieve existing share URLs without triggering a republish. operationId: getProject security: - bearerAuth: [] @@ -2110,6 +2113,7 @@ paths: - updated_at - media_files - compositions + - publishes properties: id: type: string @@ -2178,6 +2182,56 @@ paths: media_type: type: string description: Media type of the composition + publishes: + type: array + description: Successfully published share pages for this project. Each entry represents a composition that has been published and is accessible via its share_url. + items: + type: object + required: + - share_url + - composition_id + - access_level + - media_type + - published_at + - updated_at + - name + properties: + share_url: + type: string + format: uri + description: URL of the published share page + example: https://share.descript.com/view/abc123 + composition_id: + type: string + format: uuid + description: ID of the composition that was published + access_level: + type: string + enum: + - public + - unlisted + - drive + - private + - password + description: Access level of the published share page + media_type: + type: string + enum: + - video + - audio + - audiogram + description: Media type of the published output + published_at: + type: string + format: date-time + description: When the publish was created (ISO 8601) + updated_at: + type: string + format: date-time + description: When the publish was last updated (ISO 8601) + name: + type: string + description: Name of the published share page '400': description: Bad request - `project_id` is not a valid UUID content: