import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Playback errors are tracked and aggregated by Mux Data. Errors can be listed by the API, which contains data about the error code, message, and how often the error occurred. */ export declare class Errors extends APIResource { /** * Returns a list of errors. * * @example * ```ts * const errorsResponse = await client.data.errors.list(); * ``` */ list(query?: ErrorListParams | null | undefined, options?: RequestOptions): APIPromise; } export interface ErrorsResponse { data: Array; timeframe: Array; total_row_count: number | null; } export declare namespace ErrorsResponse { interface Data { /** * A unique identifier for this error. */ id: number; /** * The error code */ code: number | null; /** * The total number of views that experienced this error. */ count: number; /** * Description of the error. */ description: string | null; /** * The last time this error was seen (ISO 8601 timestamp). */ last_seen: string; /** * The error message. */ message: string | null; /** * Notes that are attached to this error. */ notes: string | null; /** * The percentage of views that experienced this error. */ percentage: number; /** * The string version of the error code */ player_error_code: string | null; } } export interface ErrorListParams { /** * Filter results using key:value pairs. Must be provided as an array query string * parameter. * * **Basic filtering:** * * - `filters[]=dimension:value` - Include rows where dimension equals value * - `filters[]=!dimension:value` - Exclude rows where dimension equals value * * **For trace dimensions (like video_cdn_trace):** * * - `filters[]=+dimension:value` - Include rows where trace contains value * - `filters[]=-dimension:value` - Exclude rows where trace contains value * - `filters[]=dimension:[value1,value2]` - Exact trace match * * **Examples:** * * - `filters[]=country:US` - US views only * - `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN */ filters?: Array; /** * Limit the results to rows that match inequality conditions from provided metric * comparison clauses. Must be provided as an array query string parameter. * * Possible filterable metrics are the same as the set of metric ids, with the * exceptions of `exits_before_video_start`, `unique_viewers`, * `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. * * Example: * * - `metric_filters[]=aggregate_startup_time>=1000` */ metric_filters?: Array; /** * Timeframe window to limit results by. Must be provided as an array query string * parameter (e.g. timeframe[]=). * * Accepted formats are... * * - array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * - duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` */ timeframe?: Array; } export declare namespace Errors { export { type ErrorsResponse as ErrorsResponse, type ErrorListParams as ErrorListParams }; } //# sourceMappingURL=errors.d.ts.map