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 @@ -21,12 +21,12 @@ public class JobStatusJsonConverter : global::System.Text.Json.Serialization.Jso
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.JobStatusDiscriminator)}");
var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);

global::Descript.ImportJobStatus? importProjectMedia = default;
if (discriminator?.JobType == global::Descript.JobStatusDiscriminatorJobType.ImportProjectMedia)
global::Descript.ImportJobStatus? importDivideprojectMedia = default;
if (discriminator?.JobType == global::Descript.JobStatusDiscriminatorJobType.ImportDivideprojectMedia)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.ImportJobStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Descript.ImportJobStatus> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Descript.ImportJobStatus)}");
importProjectMedia = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
importDivideprojectMedia = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Descript.AgentJobStatus? agent = default;
if (discriminator?.JobType == global::Descript.JobStatusDiscriminatorJobType.Agent)
Expand All @@ -38,7 +38,7 @@ public class JobStatusJsonConverter : global::System.Text.Json.Serialization.Jso

var __value = new global::Descript.JobStatus(
discriminator?.JobType,
importProjectMedia,
importDivideprojectMedia,

agent
);
Expand All @@ -55,11 +55,11 @@ public override void Write(
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

if (value.IsImportProjectMedia)
if (value.IsImportDivideprojectMedia)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Descript.ImportJobStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Descript.ImportJobStatus?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Descript.ImportJobStatus).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImportProjectMedia, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImportDivideprojectMedia, typeInfo);
}
else if (value.IsAgent)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ public sealed partial class AgentEditJobRequest
/// <summary>
/// Initializes a new instance of the <see cref="AgentEditJobRequest" /> class.
/// </summary>
/// <param name="prompt">
/// Natural language instruction for the agent to execute.<br/>
/// Examples: "add studio sound to every clip", "remove all filler words", "create a 30-second highlight reel"<br/>
/// Example: add studio sound to every clip
/// </param>
/// <param name="projectId">
/// The ID of an existing project to edit. Mutually exclusive with `project_name`.<br/>
/// Example: 9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb
Expand All @@ -94,11 +99,6 @@ public sealed partial class AgentEditJobRequest
/// <param name="model">
/// AI model to use for editing. Defaults to the default model.
/// </param>
/// <param name="prompt">
/// Natural language instruction for the agent to execute.<br/>
/// Examples: "add studio sound to every clip", "remove all filler words", "create a 30-second highlight reel"<br/>
/// Example: add studio sound to every clip
/// </param>
/// <param name="teamAccess">
/// Access level for team members when creating a new project.<br/>
/// Only applicable when `project_name` is provided (not when using `project_id`).<br/>
Expand All @@ -121,11 +121,11 @@ public AgentEditJobRequest(
global::Descript.AgentEditJobRequestTeamAccess? teamAccess,
string? callbackUrl)
{
this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt));
this.ProjectId = projectId;
this.ProjectName = projectName;
this.CompositionId = compositionId;
this.Model = model;
this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt));
this.TeamAccess = teamAccess;
this.CallbackUrl = callbackUrl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public sealed partial class AgentErrorResult
/// <summary>
/// Initializes a new instance of the <see cref="AgentErrorResult" /> class.
/// </summary>
/// <param name="status">
/// Indicates the job failed<br/>
/// Example: error
/// </param>
/// <param name="errorMessage">
/// Human-readable error message<br/>
/// Example: AI agent failed to process the request
/// </param>
/// <param name="status">
/// Indicates the job failed<br/>
/// Example: error
/// </param>
/// <param name="errorCode">
/// Machine-readable error code<br/>
/// Example: agent_execution_failed
Expand All @@ -63,8 +63,8 @@ public AgentErrorResult(
global::Descript.AgentErrorResultStatus status,
string? errorCode)
{
this.ErrorMessage = errorMessage ?? throw new global::System.ArgumentNullException(nameof(errorMessage));
this.Status = status;
this.ErrorMessage = errorMessage ?? throw new global::System.ArgumentNullException(nameof(errorMessage));
this.ErrorCode = errorCode;
}

Expand Down
20 changes: 10 additions & 10 deletions src/libs/Descript/Generated/Descript.Models.AgentJobStatus.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ public sealed partial class AgentJobStatus
/// Unique identifier for the job<br/>
/// Example: 6dc3f30a-58c2-4174-96a6-dc18cf3c7776
/// </param>
/// <param name="jobType">
/// Type of job<br/>
/// Example: agent
/// </param>
/// <param name="jobState">
/// Current state of the job:<br/>
/// - queued: Job is waiting to start<br/>
Expand All @@ -126,10 +122,6 @@ public sealed partial class AgentJobStatus
/// When the job was created<br/>
/// Example: 2025-11-18T10:30:00Z
/// </param>
/// <param name="stoppedAt">
/// When the job stopped (only present when job_state is stopped or cancelled)<br/>
/// Example: 2025-11-18T10:35:00Z
/// </param>
/// <param name="driveId">
/// The drive ID<br/>
/// Example: c9c5c47e-158a-49f7-846b-4f6ee2a229a2
Expand All @@ -142,6 +134,14 @@ public sealed partial class AgentJobStatus
/// URL to access the project in Descript web app<br/>
/// Example: https://web.descript.com/9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb
/// </param>
/// <param name="jobType">
/// Type of job<br/>
/// Example: agent
/// </param>
/// <param name="stoppedAt">
/// When the job stopped (only present when job_state is stopped or cancelled)<br/>
/// Example: 2025-11-18T10:35:00Z
/// </param>
/// <param name="progress">
/// Progress information for the workflow (only present when job_state is running)
/// </param>
Expand All @@ -164,13 +164,13 @@ public AgentJobStatus(
global::Descript.Result2? result)
{
this.JobId = jobId;
this.JobType = jobType;
this.JobState = jobState;
this.CreatedAt = createdAt;
this.StoppedAt = stoppedAt;
this.DriveId = driveId;
this.ProjectId = projectId;
this.ProjectUrl = projectUrl ?? throw new global::System.ArgumentNullException(nameof(projectUrl));
this.JobType = jobType;
this.StoppedAt = stoppedAt;
this.Progress = progress;
this.Result = result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ public sealed partial class AgentSuccessResult
/// <summary>
/// Initializes a new instance of the <see cref="AgentSuccessResult" /> class.
/// </summary>
/// <param name="status">
/// Indicates successful completion<br/>
/// Example: success
/// </param>
/// <param name="agentResponse">
/// AI response describing what was done<br/>
/// Example: I added Studio Sound to all 3 clips in your composition
Expand All @@ -72,6 +68,10 @@ public sealed partial class AgentSuccessResult
/// Whether the agent made modifications to the project<br/>
/// Example: true
/// </param>
/// <param name="status">
/// Indicates successful completion<br/>
/// Example: success
/// </param>
/// <param name="mediaSecondsUsed">
/// Media minutes (in seconds) consumed by this operation<br/>
/// Example: 34
Expand All @@ -90,9 +90,9 @@ public AgentSuccessResult(
int? mediaSecondsUsed,
int? aiCreditsUsed)
{
this.Status = status;
this.AgentResponse = agentResponse ?? throw new global::System.ArgumentNullException(nameof(agentResponse));
this.ProjectChanged = projectChanged;
this.Status = status;
this.MediaSecondsUsed = mediaSecondsUsed;
this.AiCreditsUsed = aiCreditsUsed;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ public sealed partial class EditInDescriptSchemaPostBodyProjectSchema
/// Schema version id.<br/>
/// Example: 1.0.0
/// </param>
/// <param name="files">
/// List of remote files to import into Descript.
/// </param>
/// <param name="sourceId">
/// External source id to be included in Descript export pages, see Export from Descript section for details. This ID is not currently used to deduplicate data coming into Descript, a new Project is created for each import.<br/>
/// Example: 06b3f5bb-68a2-468a-a5d9-df155c1e3588
/// </param>
/// <param name="files">
/// List of remote files to import into Descript.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -61,8 +61,8 @@ public EditInDescriptSchemaPostBodyProjectSchema(
string? sourceId)
{
this.SchemaVersion = schemaVersion ?? throw new global::System.ArgumentNullException(nameof(schemaVersion));
this.Files = files ?? throw new global::System.ArgumentNullException(nameof(files));
this.SourceId = sourceId;
this.Files = files ?? throw new global::System.ArgumentNullException(nameof(files));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public sealed partial class EditInDescriptSchemaPostBodyProjectSchemaFile
/// <summary>
/// Initializes a new instance of the <see cref="EditInDescriptSchemaPostBodyProjectSchemaFile" /> class.
/// </summary>
/// <param name="name">
/// A name for the file.
/// </param>
/// <param name="uri">
/// A public/pre-signed uri to the audio or video asset, see supported media specifications section.
/// </param>
/// <param name="name">
/// A name for the file.
/// </param>
/// <param name="startOffset">
/// The amount of time into the Project's timeline this audio or video file should start at.
/// </param>
Expand All @@ -53,8 +53,8 @@ public EditInDescriptSchemaPostBodyProjectSchemaFile(
string? name,
global::Descript.EditInDescriptSchemaPostBodyProjectSchemaFileStartOffset? startOffset)
{
this.Uri = uri ?? throw new global::System.ArgumentNullException(nameof(uri));
this.Name = name;
this.Uri = uri ?? throw new global::System.ArgumentNullException(nameof(uri));
this.StartOffset = startOffset;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public sealed partial class ImportErrorResult
/// <summary>
/// Initializes a new instance of the <see cref="ImportErrorResult" /> class.
/// </summary>
/// <param name="status">
/// Job failed completely<br/>
/// Example: error
/// </param>
/// <param name="errorMessage">
/// Human-readable error message<br/>
/// Example: Failed to import media files
/// </param>
/// <param name="status">
/// Job failed completely<br/>
/// Example: error
/// </param>
/// <param name="errorCode">
/// Machine-readable error code<br/>
/// Example: import_failed
Expand All @@ -63,8 +63,8 @@ public ImportErrorResult(
global::Descript.ImportErrorResultStatus status,
string? errorCode)
{
this.ErrorMessage = errorMessage ?? throw new global::System.ArgumentNullException(nameof(errorMessage));
this.Status = status;
this.ErrorMessage = errorMessage ?? throw new global::System.ArgumentNullException(nameof(errorMessage));
this.ErrorCode = errorCode;
}

Expand Down
18 changes: 9 additions & 9 deletions src/libs/Descript/Generated/Descript.Models.ImportJobStatus.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ public sealed partial class ImportJobStatus
/// Unique identifier for the job<br/>
/// Example: 6dc3f30a-58c2-4174-96a6-dc18cf3c7776
/// </param>
/// <param name="jobType">
/// Type of job
/// </param>
/// <param name="jobState">
/// Current state of the job:<br/>
/// - queued: Job is waiting to start<br/>
Expand All @@ -123,10 +120,6 @@ public sealed partial class ImportJobStatus
/// When the job was created<br/>
/// Example: 2025-11-18T10:30:00Z
/// </param>
/// <param name="stoppedAt">
/// When the job stopped (only present when job_state is stopped or cancelled)<br/>
/// Example: 2025-11-18T10:35:00Z
/// </param>
/// <param name="driveId">
/// The drive ID<br/>
/// Example: c9c5c47e-158a-49f7-846b-4f6ee2a229a2
Expand All @@ -139,6 +132,13 @@ public sealed partial class ImportJobStatus
/// URL to access the project in Descript web app<br/>
/// Example: https://web.descript.com/9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb
/// </param>
/// <param name="jobType">
/// Type of job
/// </param>
/// <param name="stoppedAt">
/// When the job stopped (only present when job_state is stopped or cancelled)<br/>
/// Example: 2025-11-18T10:35:00Z
/// </param>
/// <param name="progress">
/// Progress information for the workflow (only present when job_state is running)
/// </param>
Expand All @@ -161,13 +161,13 @@ public ImportJobStatus(
global::Descript.Result? result)
{
this.JobId = jobId;
this.JobType = jobType;
this.JobState = jobState;
this.CreatedAt = createdAt;
this.StoppedAt = stoppedAt;
this.DriveId = driveId;
this.ProjectId = projectId;
this.ProjectUrl = projectUrl ?? throw new global::System.ArgumentNullException(nameof(projectUrl));
this.JobType = jobType;
this.StoppedAt = stoppedAt;
this.Progress = progress;
this.Result = result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public enum ImportJobStatusJobType
/// <summary>
///
/// </summary>
ImportProjectMedia,
ImportDivideprojectMedia,
}

/// <summary>
Expand All @@ -26,7 +26,7 @@ public static string ToValueString(this ImportJobStatusJobType value)
{
return value switch
{
ImportJobStatusJobType.ImportProjectMedia => "import/project_media",
ImportJobStatusJobType.ImportDivideprojectMedia => "import/project_media",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -37,7 +37,7 @@ public static string ToValueString(this ImportJobStatusJobType value)
{
return value switch
{
"import/project_media" => ImportJobStatusJobType.ImportProjectMedia,
"import/project_media" => ImportJobStatusJobType.ImportDivideprojectMedia,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public sealed partial class ImportProjectMediaRequestAddComposition
/// <summary>
/// Initializes a new instance of the <see cref="ImportProjectMediaRequestAddComposition" /> class.
/// </summary>
/// <param name="clips">
/// Ordered list of clips to include in the composition
/// </param>
/// <param name="name">
/// Name of the composition. If not provided, uses default naming.<br/>
/// Example: Rough Cut
Expand All @@ -82,9 +85,6 @@ public sealed partial class ImportProjectMediaRequestAddComposition
/// Default Value: 30<br/>
/// Example: 30
/// </param>
/// <param name="clips">
/// Ordered list of clips to include in the composition
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -95,11 +95,11 @@ public ImportProjectMediaRequestAddComposition(
int? height,
double? fps)
{
this.Clips = clips ?? throw new global::System.ArgumentNullException(nameof(clips));
this.Name = name;
this.Width = width;
this.Height = height;
this.Fps = fps;
this.Clips = clips ?? throw new global::System.ArgumentNullException(nameof(clips));
}

/// <summary>
Expand Down
Loading