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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace Descript
{
public partial interface IApiEndpointsClient
{
/// <summary>
/// Export project transcript<br/>
/// Export the transcript from a project composition.<br/>
/// Supports plain text, Markdown, HTML, RTF, and DOCX formats.<br/>
/// Options include speaker labels, timecodes, and markers.<br/>
/// The response body is the raw transcript file (binary for `docx`,<br/>
/// text otherwise) with a `Content-Disposition: attachment` header and<br/>
/// an `X-Composition-Id` header identifying the exported composition.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Descript.ApiException"></exception>
global::System.Threading.Tasks.Task<string> ExportTranscriptAsync(

global::Descript.ExportTranscriptRequest request,
global::Descript.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Export project transcript<br/>
/// Export the transcript from a project composition.<br/>
/// Supports plain text, Markdown, HTML, RTF, and DOCX formats.<br/>
/// Options include speaker labels, timecodes, and markers.<br/>
/// The response body is the raw transcript file (binary for `docx`,<br/>
/// text otherwise) with a `Content-Disposition: attachment` header and<br/>
/// an `X-Composition-Id` header identifying the exported composition.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Descript.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Descript.AutoSDKHttpResponse<string>> ExportTranscriptAsResponseAsync(

global::Descript.ExportTranscriptRequest request,
global::Descript.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Export project transcript<br/>
/// Export the transcript from a project composition.<br/>
/// Supports plain text, Markdown, HTML, RTF, and DOCX formats.<br/>
/// Options include speaker labels, timecodes, and markers.<br/>
/// The response body is the raw transcript file (binary for `docx`,<br/>
/// text otherwise) with a `Content-Disposition: attachment` header and<br/>
/// an `X-Composition-Id` header identifying the exported composition.
/// </summary>
/// <param name="projectId">
/// The ID of the project to export from.<br/>
/// Example: 9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb
/// </param>
/// <param name="compositionId">
/// The ID of the composition to export. Defaults to the first composition.<br/>
/// Example: 39677a40-1c43-4c36-8449-46cfbc4de2b5
/// </param>
/// <param name="format">
/// Transcript file format. For `docx`, the response `content` field<br/>
/// contains the base64-encoded binary file.
/// </param>
/// <param name="includeSpeakerLabels">
/// Speaker label mode.<br/>
/// - `off`: No speaker labels<br/>
/// - `changes`: Show speaker label when the speaker changes<br/>
/// - `every_paragraph`: Show speaker label on every paragraph<br/>
/// Default Value: changes
/// </param>
/// <param name="includeMarkers">
/// Include markers in the transcript.<br/>
/// Default Value: false
/// </param>
/// <param name="timecodes">
/// Timecode options. When provided, timecodes are included in<br/>
/// the output.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<string> ExportTranscriptAsync(
global::System.Guid projectId,
global::Descript.ExportTranscriptRequestFormat format,
global::System.Guid? compositionId = default,
global::Descript.ExportTranscriptRequestIncludeSpeakerLabels? includeSpeakerLabels = default,
bool? includeMarkers = default,
global::Descript.ExportTranscriptRequestTimecodes? timecodes = default,
global::Descript.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Descript.JsonConverters
{
/// <inheritdoc />
public sealed class ExportTranscriptRequestFormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Descript.ExportTranscriptRequestFormat>
{
/// <inheritdoc />
public override global::Descript.ExportTranscriptRequestFormat 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.ExportTranscriptRequestFormatExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Descript.ExportTranscriptRequestFormat)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Descript.ExportTranscriptRequestFormat);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Descript.ExportTranscriptRequestFormat value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Descript.ExportTranscriptRequestFormatExtensions.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 ExportTranscriptRequestFormatNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Descript.ExportTranscriptRequestFormat?>
{
/// <inheritdoc />
public override global::Descript.ExportTranscriptRequestFormat? 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.ExportTranscriptRequestFormatExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Descript.ExportTranscriptRequestFormat)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Descript.ExportTranscriptRequestFormat?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Descript.ExportTranscriptRequestFormat? 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.ExportTranscriptRequestFormatExtensions.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 ExportTranscriptRequestIncludeSpeakerLabelsJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Descript.ExportTranscriptRequestIncludeSpeakerLabels>
{
/// <inheritdoc />
public override global::Descript.ExportTranscriptRequestIncludeSpeakerLabels 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.ExportTranscriptRequestIncludeSpeakerLabelsExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Descript.ExportTranscriptRequestIncludeSpeakerLabels)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Descript.ExportTranscriptRequestIncludeSpeakerLabels);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Descript.ExportTranscriptRequestIncludeSpeakerLabels value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Descript.ExportTranscriptRequestIncludeSpeakerLabelsExtensions.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 ExportTranscriptRequestIncludeSpeakerLabelsNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Descript.ExportTranscriptRequestIncludeSpeakerLabels?>
{
/// <inheritdoc />
public override global::Descript.ExportTranscriptRequestIncludeSpeakerLabels? 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.ExportTranscriptRequestIncludeSpeakerLabelsExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Descript.ExportTranscriptRequestIncludeSpeakerLabels)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Descript.ExportTranscriptRequestIncludeSpeakerLabels?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Descript.ExportTranscriptRequestIncludeSpeakerLabels? 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.ExportTranscriptRequestIncludeSpeakerLabelsExtensions.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 @@ -129,6 +129,14 @@ namespace Descript

typeof(global::Descript.JsonConverters.PublishJobRequestAccessLevelNullableJsonConverter),

typeof(global::Descript.JsonConverters.ExportTranscriptRequestFormatJsonConverter),

typeof(global::Descript.JsonConverters.ExportTranscriptRequestFormatNullableJsonConverter),

typeof(global::Descript.JsonConverters.ExportTranscriptRequestIncludeSpeakerLabelsJsonConverter),

typeof(global::Descript.JsonConverters.ExportTranscriptRequestIncludeSpeakerLabelsNullableJsonConverter),

typeof(global::Descript.JsonConverters.ListJobsTypeJsonConverter),

typeof(global::Descript.JsonConverters.ListJobsTypeNullableJsonConverter),
Expand Down Expand Up @@ -255,6 +263,10 @@ namespace Descript
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishJobRequestMediaType), TypeInfoPropertyName = "PublishJobRequestMediaType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishJobRequestResolution), TypeInfoPropertyName = "PublishJobRequestResolution2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishJobRequestAccessLevel), TypeInfoPropertyName = "PublishJobRequestAccessLevel2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ExportTranscriptRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ExportTranscriptRequestFormat), TypeInfoPropertyName = "ExportTranscriptRequestFormat2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ExportTranscriptRequestIncludeSpeakerLabels), TypeInfoPropertyName = "ExportTranscriptRequestIncludeSpeakerLabels2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ExportTranscriptRequestTimecodes))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListJobsType), TypeInfoPropertyName = "ListJobsType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListProjectsSort), TypeInfoPropertyName = "ListProjectsSort2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListProjectsDirection), TypeInfoPropertyName = "ListProjectsDirection2")]
Expand All @@ -263,6 +275,7 @@ namespace Descript
[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.PublishJobResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListJobsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Descript.JobStatus>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListJobsResponsePagination))]
Expand Down
Loading