import { IVisualization } from './Visualizations/Interfaces/IVisualization'; import { ImportOptions } from './Primitives/Interfaces'; import { DashboardFilter } from './Filters/DashboardFilter'; import { Theme } from './Enums'; import { DataSource } from './Data/DataSource'; /** * Represents a Reveal .rdash file. */ export declare class RdashDocument { /** * Creates a new instance of an `RdashDocument`. */ constructor(); constructor(title: string); /** * Gets or sets the title of the dashboard. */ title: string; /** * Gets or sets the description of the dashboard. */ description?: string; /** * Gets or sets the name of the theme the dashboard will apply to all visualizations. */ theme: Theme; /** * Gets the name of the API that created the .rdash file. */ readonly createdWith: string; /** * Gets or sets the name of the API that last saved the .rdash file. */ savedWith?: string; formatVersion: number; /** * Gets or sets whether the viewer displaying the dashboard will automatically layout visualizations, or use an absolute layout controlled by each visualization's ColumnSpan and RowSpan properties. True by default. */ useAutoLayout: boolean; /** * Gets or sets the tags associated with the dashboard. */ tags?: string; /** * Gets or sets the collection of data sources available for creating visualizations. */ dataSources: DataSource[]; /** * Gets or sets the collection of dashboard filters that can bound to any visualization using the visualization's FilterBindings property. */ filters: DashboardFilter[]; /** * Gets or sets the collection of visualizations that are displayed in the dashboard. */ visualizations: IVisualization[]; /*** * Creates a new instance of an `RdashDocument` from an existing Reveal dashboard. * @param dashboard The dashboard ID or name used to load the dashboard from the Reveal SDK server. * @returns A promise that resolves to the loaded `RdashDocument`. * @throws An error if the dashboard cannot be loaded. */ static load(dashboard: string): Promise; /** * Creates a new instance of an `RdashDocument` from an existing Reveal dashboard. * @param dashboard The Blob representation of the Reveal dashboard. * @returns A promise that resolves to the loaded `RdashDocument`. * @throws An error if the dashboard cannot be loaded. */ static load(dashboard: Blob): Promise; /** * Creates a new instance of an `RdashDocument` from an existing Reveal dashboard. * @param dashboard The `RVDashboard` object instance. * @returns A promise that resolves to the loaded `RdashDocument`. * @throws An error if the dashboard cannot be loaded. */ static load(dashboard: unknown): Promise; /** * Loads an RdashDocument from a binary buffer. * This function accepts a binary buffer (ArrayBuffer or Node.js Buffer) that represents an RDASH file. * @param buffer - The binary buffer containing the RDASH data. * @returns A promise that resolves to an RdashDocument instance. * @throws An error if the buffer cannot be processed or deserialized. */ static loadFromBuffer(buffer: ArrayBuffer | Buffer): Promise; /** * Creates a new instance of an `RdashDocument` from a JSON string which represents the contents of the RDASH file. * @param json The JSON string representation of the contents of the RDASH file. * @returns A new instance of an `RdashDocument`. */ static loadFromJson(json: string): RdashDocument; /** * Imports visualizations from another `RdashDocument` into this one. * @param document The `RdashDocument` to import from. * @param visualization The visualization to import. If not specified, all visualizations are imported. */ import(document: RdashDocument, visualization?: string | IVisualization, options?: ImportOptions): void; /** * Converts the RdashDocument to a Blob. * @returns A Blob representation of the `Rdash` file. */ toBlob(): Blob; /** * Converts the `RdashDocument` to a JSON string representation of the contents of the RDASH file. * @returns A JSON string representation of the contents of the RDASH file. */ toJsonString(): string; /** * Converts the `RdashDocument` to an RVDashboard object. * @returns An RVDashboard object. */ toRVDashboard(): Promise; /** * Validates the RdashDocument to ensure it's in a valid state for serialization. */ validate(): void; }