import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { BasePage, type BasePageParams, PagePromise } from "../../core/pagination.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Annotations allow you to add notes at a specific datetime to view in the Mux Data dashboard. */ export declare class Annotations extends APIResource { /** * Creates a new annotation. * * @example * ```ts * const annotation = await client.data.annotations.create({ * date: 1745438400, * note: 'This is a note', * sub_property_id: '123456', * }); * ``` */ create(body: AnnotationCreateParams, options?: RequestOptions): APIPromise; /** * Returns the details of a specific annotation. * * @example * ```ts * const annotation = await client.data.annotations.retrieve( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * ); * ``` */ retrieve(annotationID: string, options?: RequestOptions): APIPromise; /** * Updates an existing annotation. * * @example * ```ts * const annotation = await client.data.annotations.update( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { * date: 1745438400, * note: 'This is a note', * sub_property_id: '123456', * }, * ); * ``` */ update(annotationID: string, body: AnnotationUpdateParams, options?: RequestOptions): APIPromise; /** * Returns a list of annotations. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const annotation of client.data.annotations.list()) { * // ... * } * ``` */ list(query?: AnnotationListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Deletes an annotation. * * @example * ```ts * await client.data.annotations.delete( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * ); * ``` */ delete(annotationID: string, options?: RequestOptions): APIPromise; } export type AnnotationsBasePage = BasePage; export interface Annotation { /** * Unique identifier for the annotation */ id: string; /** * Datetime when the annotation applies */ date: string; /** * The annotation note content */ note: string; /** * Customer-defined sub-property identifier */ sub_property_id?: string | null; } export interface AnnotationInput { /** * Datetime when the annotation applies (Unix timestamp) */ date: number; /** * The annotation note content */ note: string; /** * Customer-defined sub-property identifier */ sub_property_id?: string; } export interface AnnotationResponse { data: Annotation; } export interface ListAnnotationsResponse { data: Array; /** * Total number of annotations available */ total_row_count: number; /** * Start and end unix timestamps for the data range */ timeframe?: Array; } export interface AnnotationCreateParams { /** * Datetime when the annotation applies (Unix timestamp) */ date: number; /** * The annotation note content */ note: string; /** * Customer-defined sub-property identifier */ sub_property_id?: string; } export interface AnnotationUpdateParams { /** * Datetime when the annotation applies (Unix timestamp) */ date: number; /** * The annotation note content */ note: string; /** * Customer-defined sub-property identifier */ sub_property_id?: string; } export interface AnnotationListParams extends BasePageParams { /** * Sort order. */ order_direction?: 'asc' | 'desc'; /** * 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 Annotations { export { type Annotation as Annotation, type AnnotationInput as AnnotationInput, type AnnotationResponse as AnnotationResponse, type ListAnnotationsResponse as ListAnnotationsResponse, type AnnotationsBasePage as AnnotationsBasePage, type AnnotationCreateParams as AnnotationCreateParams, type AnnotationUpdateParams as AnnotationUpdateParams, type AnnotationListParams as AnnotationListParams, }; } //# sourceMappingURL=annotations.d.ts.map