Skip to content

Types

Types for the async job system: server-side jobs and the client-side uploads that feed them, shared by the task tray and the features that enqueue work.

Interfaces

BatchResult

Defined in: src/shared/jobs/types.ts:89

Result of a batch_* parent job (the server's BatchResult).

Properties

Property Type Defined in
cancelled number src/shared/jobs/types.ts:93
children string[] src/shared/jobs/types.ts:94
failed number src/shared/jobs/types.ts:92
succeeded number src/shared/jobs/types.ts:91
total number src/shared/jobs/types.ts:90

BatchSubmitRequest

Defined in: src/shared/jobs/types.ts:80

Body for POST /jobs/batch, mirroring the API's SubmitBatchRequest. One child job is created per file_id, all sharing the same options.

Properties

Property Type Defined in
file_ids string[] src/shared/jobs/types.ts:82
model? string src/shared/jobs/types.ts:84
opts? Record\<string, unknown> src/shared/jobs/types.ts:83
sys_msg? string src/shared/jobs/types.ts:85
type BatchJobType src/shared/jobs/types.ts:81

ConvertOpts

Defined in: src/shared/jobs/types.ts:44

Conversion options, mirroring the server's ConvertVideoRequest.

Properties

Property Type Defined in
preset? ConversionPreset src/shared/jobs/types.ts:47
resolution? string src/shared/jobs/types.ts:45
target_bitrate? string src/shared/jobs/types.ts:46

ConvertResult

Defined in: src/shared/jobs/types.ts:121

Result of a convert job (the server's ConvertResult).

Properties

Property Type Defined in
file_id string src/shared/jobs/types.ts:122
video_url string src/shared/jobs/types.ts:123

Job

Defined in: src/shared/jobs/types.ts:51

A server-side job, mirroring the API's JobResponse.

Properties

Property Type Defined in
completed number src/shared/jobs/types.ts:57
created_at string src/shared/jobs/types.ts:63
error string | null src/shared/jobs/types.ts:60
error_code string | null src/shared/jobs/types.ts:61
error_details | Record\<string, unknown> | null src/shared/jobs/types.ts:62
id string src/shared/jobs/types.ts:52
parent_id string | null src/shared/jobs/types.ts:58
progress number src/shared/jobs/types.ts:55
result | Record\<string, unknown> | null src/shared/jobs/types.ts:59
status JobStatus src/shared/jobs/types.ts:54
total number src/shared/jobs/types.ts:56
type string src/shared/jobs/types.ts:53
updated_at string src/shared/jobs/types.ts:64

SrtResult

Defined in: src/shared/jobs/types.ts:108

Result of a generate_srt or fix_srt job (the server's SrtResult).

Properties

Property Type Defined in
srt_content string src/shared/jobs/types.ts:111
srt_file_id string src/shared/jobs/types.ts:109
srt_url string src/shared/jobs/types.ts:110

SubmitJobRequest

Defined in: src/shared/jobs/types.ts:68

Body for POST /jobs, mirroring the API's SubmitJobRequest.

Properties

Property Type Defined in
file_id string src/shared/jobs/types.ts:70
model? string src/shared/jobs/types.ts:72
opts? Record\<string, unknown> src/shared/jobs/types.ts:71
sys_msg? string src/shared/jobs/types.ts:73
type JobType src/shared/jobs/types.ts:69

TranscribeOpts

Defined in: src/shared/jobs/types.ts:25

Curated transcription options, mirroring the server's TranscribeOptions. Every field is optional: an unset field is omitted from the request, so the server falls back to its own tuned defaults.

Properties

Property Type Defined in
beam_size? number src/shared/jobs/types.ts:27
best_of? number src/shared/jobs/types.ts:28
compression_ratio_threshold? number src/shared/jobs/types.ts:32
condition_on_previous_text? boolean src/shared/jobs/types.ts:35
initial_prompt? string src/shared/jobs/types.ts:36
language? string src/shared/jobs/types.ts:26
length_penalty? number src/shared/jobs/types.ts:30
log_prob_threshold? number src/shared/jobs/types.ts:33
no_speech_threshold? number src/shared/jobs/types.ts:34
patience? number src/shared/jobs/types.ts:29
temperature? number src/shared/jobs/types.ts:31
vad_filter? boolean src/shared/jobs/types.ts:37

TranscribeResult

Defined in: src/shared/jobs/types.ts:115

Result of a transcribe job (the server's TranscribeResult).

Properties

Property Type Defined in
transcript string src/shared/jobs/types.ts:117
transcript_id string src/shared/jobs/types.ts:116

UploadedFile

Defined in: src/shared/jobs/types.ts:98

A stored profile file, mirroring the API's ProfileFileResponse.

Properties

Property Type Defined in
created_at string | null src/shared/jobs/types.ts:104
folder string | null src/shared/jobs/types.ts:103
id string src/shared/jobs/types.ts:99
name string src/shared/jobs/types.ts:100
type string | null src/shared/jobs/types.ts:102
url string src/shared/jobs/types.ts:101

Type Aliases

BatchJobType

type BatchJobType =
  | "batch_generate_srt"
  | "batch_transcribe"
  | "batch_convert"
  | "batch_fix_srt";

Defined in: src/shared/jobs/types.ts:11

The batch operations, each running one single-op across many files.


ConversionPreset

type ConversionPreset = "performance" | "balanced" | "quality";

Defined in: src/shared/jobs/types.ts:41

Encoder speed/quality preset for conversion, mirroring the server.


JobStatus

type JobStatus = "queued" | "running" | "succeeded" | "failed" | "cancelled";

Defined in: src/shared/jobs/types.ts:18

A job's lifecycle status.


JobType

type JobType = "generate_srt" | "transcribe" | "convert" | "fix_srt";

Defined in: src/shared/jobs/types.ts:8

The single-file long-running operations the server runs as jobs.