import Connection from '../connection'; import { Schema } from '../types'; import { ReportMetadata, ReportExecuteResult, ReportRetrieveResult, ReportDescribeResult, ReportInfo, ReportInstanceInfo, DashboardMetadata, DashboardResult, DashboardStatusResult, DashboardRefreshResult, DashboardInfo } from './analytics/types'; import { QueryExplainResult } from '../query'; export type { ReportMetadata, ReportExecuteResult, ReportRetrieveResult, ReportDescribeResult, ReportInfo, ReportInstanceInfo, DashboardMetadata, DashboardResult, DashboardStatusResult, DashboardRefreshResult, DashboardInfo, }; export type ReportExecuteOptions = { details?: boolean; metadata?: { reportMetadata: Partial; }; }; /** * Report object class in Analytics API */ export declare class ReportInstance { _report: Report; _conn: Connection; id: string; /** * */ constructor(report: Report, id: string); /** * Retrieve report result asynchronously executed */ retrieve(): Promise; } /** * Report object class in Analytics API */ export declare class Report { _conn: Connection; id: string; /** * */ constructor(conn: Connection, id: string); /** * Describe report metadata */ describe(): Promise; /** * Destroy a report */ destroy(): Promise; /** * Synonym of Analytics~Report#destroy() */ delete: () => Promise; /** * Synonym of Analytics~Report#destroy() */ del: () => Promise; /** * Clones a given report */ clone(name: string): Promise; /** * Explain plan for executing report */ explain(): Promise; /** * Run report synchronously */ execute(options?: ReportExecuteOptions): Promise; /** * Synonym of Analytics~Report#execute() */ run: (options?: ReportExecuteOptions) => Promise; /** * Synonym of Analytics~Report#execute() */ exec: (options?: ReportExecuteOptions) => Promise; /** * Run report asynchronously */ executeAsync(options?: ReportExecuteOptions): Promise; /** * Get report instance for specified instance ID */ instance(id: string): ReportInstance; /** * List report instances which had been executed asynchronously */ instances(): Promise; } /** * Dashboard object class in the Analytics API */ export declare class Dashboard { _conn: Connection; id: string; /** * */ constructor(conn: Connection, id: string); /** * Describe dashboard metadata * * @method Analytics~Dashboard#describe * @param {Callback.} [callback] - Callback function * @returns {Promise.} */ describe(): Promise; /** * Get details about dashboard components */ components(componentIds?: string | string[]): Promise; /** * Get dashboard status */ status(): Promise; /** * Refresh a dashboard */ refresh(): Promise; /** * Clone a dashboard */ clone(config: { name: string; folderId?: string; } | string, folderId?: string): Promise; /** * Destroy a dashboard */ destroy(): Promise; /** * Synonym of Analytics~Dashboard#destroy() */ delete: () => Promise; /** * Synonym of Analytics~Dashboard#destroy() */ del: () => Promise; } /** * API class for Analytics API */ export declare class Analytics { _conn: Connection; /** * */ constructor(conn: Connection); /** * Get report object of Analytics API */ report(id: string): Report; /** * Get recent report list */ reports(): import("../types").StreamPromise; /** * Get dashboard object of Analytics API */ dashboard(id: string): Dashboard; /** * Get recent dashboard list */ dashboards(): import("../types").StreamPromise; } export default Analytics;