import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * The Mux Data Real-time API has been deprecated, please refer to the * Mux Data `Monitoring` APIs which provide the same functionality. * Mux Data Monitoring metrics are available to Mux Data customers on a Media plan. */ export declare class RealTime extends APIResource { /** * Lists available real-time dimensions. This API is now deprecated, please use the * `List Monitoring Dimensions` API. * * @deprecated */ listDimensions(options?: RequestOptions): APIPromise; /** * Lists available real-time metrics. This API is now deprecated, please use the * `List Monitoring Metrics` API. * * @deprecated */ listMetrics(options?: RequestOptions): APIPromise; /** * Gets breakdown information for a specific dimension and metric along with the * number of concurrent viewers and negative impact score. This API is now * deprecated, please use the `Get Monitoring Breakdown` API. * * @deprecated */ retrieveBreakdown(realtimeMetricID: 'current-concurrent-viewers' | 'current-rebuffering-percentage' | 'exits-before-video-start' | 'playback-failure-percentage' | 'current-average-bitrate', query?: RealTimeRetrieveBreakdownParams | null | undefined, options?: RequestOptions): APIPromise; /** * Gets histogram timeseries information for a specific metric. This API is now * deprecated, please use the `Get Monitoring Histogram Timeseries` API. * * @deprecated */ retrieveHistogramTimeseries(realtimeHistogramMetricID: 'video-startup-time', query?: RealTimeRetrieveHistogramTimeseriesParams | null | undefined, options?: RequestOptions): APIPromise; /** * Gets Time series information for a specific metric along with the number of * concurrent viewers. This API is now deprecated, please use the * `Get Monitoring Timeseries` API. * * @deprecated */ retrieveTimeseries(realtimeMetricID: 'current-concurrent-viewers' | 'current-rebuffering-percentage' | 'exits-before-video-start' | 'playback-failure-percentage' | 'current-average-bitrate', query?: RealTimeRetrieveTimeseriesParams | null | undefined, options?: RequestOptions): APIPromise; } export interface RealTimeBreakdownResponse { data: Array; timeframe: Array; total_row_count: number | null; } export declare namespace RealTimeBreakdownResponse { interface Data { concurrent_viewers: number; metric_value: number | null; negative_impact: number; starting_up_viewers: number; value: string | null; display_value?: string; } } export interface RealTimeDimensionsResponse { data: Array; timeframe: Array; total_row_count: number | null; } export declare namespace RealTimeDimensionsResponse { interface Data { display_name: string; name: string; } } export interface RealTimeHistogramTimeseriesResponse { data: Array; meta: RealTimeHistogramTimeseriesResponse.Meta; timeframe: Array; total_row_count: number | null; } export declare namespace RealTimeHistogramTimeseriesResponse { interface Data { average: number | null; bucket_values: Array; max_percentage: number; median: number | null; p95: number | null; sum: number; timestamp: string; } namespace Data { interface BucketValue { count: number; percentage: number; } } interface Meta { bucket_unit: string; buckets: Array; } namespace Meta { interface Bucket { end: number | null; start: number; } } } export interface RealTimeMetricsResponse { data: Array; timeframe: Array; total_row_count: number | null; } export declare namespace RealTimeMetricsResponse { interface Data { display_name: string; name: string; } } export interface RealTimeTimeseriesResponse { data: Array; timeframe: Array; total_row_count: number | null; } export declare namespace RealTimeTimeseriesResponse { interface Data { concurrent_viewers: number; date: string; value: number | null; } } export interface RealTimeRetrieveBreakdownParams { /** * Dimension the specified value belongs to */ dimension?: 'asn' | 'cdn' | 'country' | 'operating_system' | 'player_name' | 'region' | 'stream_type' | 'sub_property_id' | 'video_series' | 'video_title'; /** * Limit the results to rows that match conditions from provided key:value pairs. * Must be provided as an array query string parameter. * * To exclude rows that match a certain condition, prepend a `!` character to the * dimension. * * Possible filter names are the same as returned by the List Monitoring Dimensions * endpoint. * * Example: * * - `filters[]=operating_system:windows&filters[]=!country:US` */ filters?: Array; /** * Value to order the results by */ order_by?: 'negative_impact' | 'value' | 'views' | 'field'; /** * Sort order. */ order_direction?: 'asc' | 'desc'; /** * Timestamp to limit results by. This value must be provided as a unix timestamp. * Defaults to the current unix timestamp. */ timestamp?: number; } export interface RealTimeRetrieveHistogramTimeseriesParams { /** * Limit the results to rows that match conditions from provided key:value pairs. * Must be provided as an array query string parameter. * * To exclude rows that match a certain condition, prepend a `!` character to the * dimension. * * Possible filter names are the same as returned by the List Monitoring Dimensions * endpoint. * * Example: * * - `filters[]=operating_system:windows&filters[]=!country:US` */ filters?: Array; } export interface RealTimeRetrieveTimeseriesParams { /** * Limit the results to rows that match conditions from provided key:value pairs. * Must be provided as an array query string parameter. * * To exclude rows that match a certain condition, prepend a `!` character to the * dimension. * * Possible filter names are the same as returned by the List Monitoring Dimensions * endpoint. * * Example: * * - `filters[]=operating_system:windows&filters[]=!country:US` */ filters?: Array; /** * Timestamp to use as the start of the timeseries data. This value must be * provided as a unix timestamp. Defaults to 30 minutes ago. */ timestamp?: number; } export declare namespace RealTime { export { type RealTimeBreakdownResponse as RealTimeBreakdownResponse, type RealTimeDimensionsResponse as RealTimeDimensionsResponse, type RealTimeHistogramTimeseriesResponse as RealTimeHistogramTimeseriesResponse, type RealTimeMetricsResponse as RealTimeMetricsResponse, type RealTimeTimeseriesResponse as RealTimeTimeseriesResponse, type RealTimeRetrieveBreakdownParams as RealTimeRetrieveBreakdownParams, type RealTimeRetrieveHistogramTimeseriesParams as RealTimeRetrieveHistogramTimeseriesParams, type RealTimeRetrieveTimeseriesParams as RealTimeRetrieveTimeseriesParams, }; } //# sourceMappingURL=real-time.d.ts.map