import { APIResource } from '../resource'; import { APIPromise } from '../api-promise'; import type { RequestOptions } from '../internal/request-options'; export declare class LiveStreamAnalytics extends APIResource { /** * Get usage analytics for your live streams. * * @param {LiveStreamAnalyticUsageParams} body - The request body to send. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} Successful response * * @example * ```ts * const liveStreamAnalytic = await client.liveStreamAnalytics.usage({ * date_range: { * start_at: '2024-01-01', * end_at: '2024-01-01', * }, * group_by: 'daily', * metrics: ['bandwidth_consumption'], * }); * ``` */ usage(body: LiveStreamAnalyticUsageParams, options?: RequestOptions): APIPromise; } export interface LiveStreamAnalyticUsageParams { date_range: LiveStreamAnalyticUsageParams.DateRange; /** * Group the data either weekly, daily or monthly */ group_by: 'daily' | 'weekly' | 'monthly'; /** * List of metrics required in response */ metrics: Array<'bandwidth_consumption' | 'asset_duration' | 'storage_unit'>; } export declare namespace LiveStreamAnalyticUsageParams { interface DateRange { /** * Date in yyyy-MM-dd format * @format date */ start_at: string; /** * Date in yyyy-MM-dd format * @format date */ end_at: string; } } export interface LiveStreamAnalyticUsageResponse { /** * Storage data unit information */ storage_data_unit: 'min' | 'gb'; /** * Data about bandwidth consumption */ bandwidth_consumption?: Array; /** * Data about input seconds processed */ asset_duration?: Array; /** * Bytes or seconds of storage used */ storage_unit?: Array; } export declare namespace LiveStreamAnalyticUsageResponse { interface BandwidthConsumption { /** * Bandwidth consumption data in bytes * @format uint64 */ units: number; /** * Milliseconds since epoch timestamp for the data point * @format int64 */ timestamp: number; } interface AssetDuration { /** * Input asset seconds * @format int64 */ units: number; /** * Milliseconds since epoch timestamp for the data point * @format int64 */ timestamp: number; } interface StorageUnit { /** * Storage unit in either bytes or seconds. You can get the information from `storage_data_unit` field. * @format uint64 */ units: number; /** * Milliseconds since epoch timestamp for the data point * @format int64 */ timestamp: number; } } export declare namespace LiveStreamAnalytics { export { type LiveStreamAnalyticUsageResponse as LiveStreamAnalyticUsageResponse, type LiveStreamAnalyticUsageParams as LiveStreamAnalyticUsageParams, }; } //# sourceMappingURL=live-stream-analytics.d.ts.map