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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ partial void ProcessGetProjectResponseContent(

/// <summary>
/// Get project details<br/>
/// Get a detailed project summary including all media files and compositions.<br/>
/// Get a detailed project summary including all media files, compositions,<br/>
/// and existing publishes.<br/>
/// Returns the project's id, name, drive_id, a map of media files (keyed by<br/>
/// display path) with type and duration, and a list of compositions with id,<br/>
/// name, duration, and media type.<br/>
/// 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,<br/>
/// name, duration, and media type, and a list of successfully published<br/>
/// share pages with their URLs, access levels, and publish times.<br/>
/// Use this to inspect a project's contents before editing or importing media,<br/>
/// or to retrieve existing share URLs without triggering a republish.
/// </summary>
/// <param name="projectId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand All @@ -68,11 +71,14 @@ partial void ProcessGetProjectResponseContent(
}
/// <summary>
/// Get project details<br/>
/// Get a detailed project summary including all media files and compositions.<br/>
/// Get a detailed project summary including all media files, compositions,<br/>
/// and existing publishes.<br/>
/// Returns the project's id, name, drive_id, a map of media files (keyed by<br/>
/// display path) with type and duration, and a list of compositions with id,<br/>
/// name, duration, and media type.<br/>
/// 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,<br/>
/// name, duration, and media type, and a list of successfully published<br/>
/// share pages with their URLs, access levels, and publish times.<br/>
/// Use this to inspect a project's contents before editing or importing media,<br/>
/// or to retrieve existing share URLs without triggering a republish.
/// </summary>
/// <param name="projectId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ public partial interface IApiEndpointsClient
{
/// <summary>
/// Get project details<br/>
/// Get a detailed project summary including all media files and compositions.<br/>
/// Get a detailed project summary including all media files, compositions,<br/>
/// and existing publishes.<br/>
/// Returns the project's id, name, drive_id, a map of media files (keyed by<br/>
/// display path) with type and duration, and a list of compositions with id,<br/>
/// name, duration, and media type.<br/>
/// 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,<br/>
/// name, duration, and media type, and a list of successfully published<br/>
/// share pages with their URLs, access levels, and publish times.<br/>
/// Use this to inspect a project's contents before editing or importing media,<br/>
/// or to retrieve existing share URLs without triggering a republish.
/// </summary>
/// <param name="projectId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand All @@ -22,11 +25,14 @@ public partial interface IApiEndpointsClient
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Get project details<br/>
/// Get a detailed project summary including all media files and compositions.<br/>
/// Get a detailed project summary including all media files, compositions,<br/>
/// and existing publishes.<br/>
/// Returns the project's id, name, drive_id, a map of media files (keyed by<br/>
/// display path) with type and duration, and a list of compositions with id,<br/>
/// name, duration, and media type.<br/>
/// 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,<br/>
/// name, duration, and media type, and a list of successfully published<br/>
/// share pages with their URLs, access levels, and publish times.<br/>
/// Use this to inspect a project's contents before editing or importing media,<br/>
/// or to retrieve existing share URLs without triggering a republish.
/// </summary>
/// <param name="projectId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Descript.JsonConverters
{
/// <inheritdoc />
public sealed class GetProjectResponsePublisheAccessLevelJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Descript.GetProjectResponsePublisheAccessLevel>
{
/// <inheritdoc />
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;
}

/// <inheritdoc />
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));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace Descript.JsonConverters
{
/// <inheritdoc />
public sealed class GetProjectResponsePublisheAccessLevelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Descript.GetProjectResponsePublisheAccessLevel?>
{
/// <inheritdoc />
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;
}

/// <inheritdoc />
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));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Descript.JsonConverters
{
/// <inheritdoc />
public sealed class GetProjectResponsePublisheMediaTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Descript.GetProjectResponsePublisheMediaType>
{
/// <inheritdoc />
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;
}

/// <inheritdoc />
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));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace Descript.JsonConverters
{
/// <inheritdoc />
public sealed class GetProjectResponsePublisheMediaTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Descript.GetProjectResponsePublisheMediaType?>
{
/// <inheritdoc />
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;
}

/// <inheritdoc />
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));
}
}
}
}
13 changes: 13 additions & 0 deletions src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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::Descript.GetProjectResponseComposition>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetProjectResponseComposition))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Descript.GetProjectResponsePublishe>))]
[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<global::Descript.ImportProjectMediaRequestAddMediaUrlImport, global::Descript.ImportProjectMediaRequestAddMediaDirectUpload, global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequence>?), TypeInfoPropertyName = "ImportProjectMediaRequestAddMediaMultitrackSequence_a84f7d44496d84a5")]
Expand All @@ -322,6 +334,7 @@ namespace Descript
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.JobStatus>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.ListProjectsResponseDataItem>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.GetProjectResponseComposition>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.GetProjectResponsePublishe>))]
public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
Expand Down
Loading