UNPKG

plywood-proxy

Version:
73 lines (72 loc) 2.4 kB
import * as Q from 'q'; import { Instance } from 'immutable-class'; import { Duration, Timezone } from 'chronoshift'; import { Expression, ExpressionJS, Executor, RefExpression, Attributes } from 'plywood'; import { MaxTime, MaxTimeJS } from '../max-time/max-time'; import { RefreshRule, RefreshRuleJS } from '../refresh-rule/refresh-rule'; export interface DataSourceValue { name: string; title?: string; engine: string; source: string; subsetFilter?: Expression; options?: Lookup<any>; introspection: string; timeAttribute: RefExpression; defaultTimezone: Timezone; defaultDuration: Duration; refreshRule: RefreshRule; maxTime?: MaxTime; executor?: Executor; } export interface DataSourceJS { name: string; title?: string; engine: string; source: string; subsetFilter?: ExpressionJS; options?: Lookup<any>; introspection?: string; timeAttribute?: string; defaultTimezone?: string; defaultDuration?: string; refreshRule?: RefreshRuleJS; maxTime?: MaxTimeJS; } export declare class DataSource implements Instance<DataSourceValue, DataSourceJS> { static DEFAULT_INTROSPECTION: string; static INTROSPECTION_VALUES: string[]; static DEFAULT_TIMEZONE: Timezone; static DEFAULT_DURATION: Duration; static isDataSource(candidate: any): boolean; static updateMaxTime(dataSource: DataSource): Q.Promise<DataSource>; static fromJS(parameters: DataSourceJS, executor?: Executor): DataSource; name: string; title: string; engine: string; source: string; subsetFilter: Expression; options: Lookup<any>; introspection: string; timeAttribute: RefExpression; defaultTimezone: Timezone; defaultDuration: Duration; refreshRule: RefreshRule; maxTime: MaxTime; executor: Executor; constructor(parameters: DataSourceValue); valueOf(): DataSourceValue; toJS(): DataSourceJS; toJSON(): DataSourceJS; toString(): string; equals(other: DataSource): boolean; attachExecutor(executor: Executor): DataSource; toClientDataSource(): DataSource; isQueryable(): boolean; getMaxTimeDate(): Date; updatedText(): string; shouldQueryMaxTime(): boolean; isTimeAttribute(ex: Expression): boolean; addAttributes(attributes: Attributes): DataSource; changeMaxTime(maxTime: MaxTime): DataSource; }