// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; export class Transcoders extends APIResource { /** * Retrieve all the transcoders statuses for a specific job * * @example * ```ts * const transcoders = await client.jobs.transcoders.list( * 'jobId', * ); * ``` */ list(jobID: string, options?: RequestOptions): APIPromise { return this._client.get(path`/api/jobs/${jobID}/transcoders`, { ...options, __security: { projectAccessTokenAuth: true }, }); } } /** * Response containing a list of transcoders for a job */ export interface TranscoderListResponse { data: Array; /** * Status indicates the response status "success" */ status: 'success'; } export namespace TranscoderListResponse { export interface Data { /** * Unique identifier of the transcoder */ id: string; /** * Billable time in seconds */ billable_time: number; /** * End time of the current chunk in seconds */ chunk_end_time: number; /** * Number of the chunk being processed */ chunk_number: number; /** * Start time of the current chunk in seconds */ chunk_start_time: number; /** * CPU time used for transcoding in seconds */ cpu_time: number; /** * Timestamp when the status was created */ created_at: string; /** * Current frames per second being processed */ fps: number; /** * Current frame number being processed */ frame: number; /** * Unique identifier of the job */ job_id: string; /** * Current output time in seconds */ out_time: number; /** * Progress percentage of the transcoding operation (0-100) */ progress: number; /** * Current processing speed multiplier */ speed: number; /** * Current status of the transcoder (starting, transcoding, finished, failed) */ status: 'starting' | 'pending' | 'transcoding' | 'completed' | 'failed' | 'cancelled'; /** * Unique identifier of the transcoder instance (generated by the transcoder) */ transcoder_instance_id: string; /** * Timestamp when the status was last updated */ updated_at: string; /** * Error message if the transcoding failed */ error?: Shared.ChunkifyError; } } export declare namespace Transcoders { export { type TranscoderListResponse as TranscoderListResponse }; }