diff --git a/google.visualization/google.visualization.d.ts b/google.visualization/google.visualization.d.ts index 9ed800798c..d53061a5dc 100644 --- a/google.visualization/google.visualization.d.ts +++ b/google.visualization/google.visualization.d.ts @@ -1,6 +1,6 @@ // Type definitions for Google Visualisation Apis // Project: https://developers.google.com/chart/ -// Definitions by: Dan Ludwig +// Definitions by: Dan Ludwig , Gregory Moore // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace google { @@ -186,6 +186,42 @@ declare namespace google { function arrayToDataTable(data: any[], firstRowIsData?: boolean): DataTable; + //#endregion + //#region Query + + // https://developers.google.com/chart/interactive/docs/reference#query + export class Query { + constructor(dataSourceUrl: string, options?: QueryOptions); + + abort(): void; + + setRefreshInterval(intervalSeconds: number): void; + setTimeout(timeoutSeconds: number): void; + setQuery(queryString:string): void; + + send(responseHandler): void; + } + + export interface QueryOptions { + sendMethod?: string, + makeRequestParams?: Object + } + + //#endregion + //#region QueryResponse + + // https://developers.google.com/chart/interactive/docs/reference#queryresponse + export class QueryResponse { + constructor(responseObject: Object); + + getDataTable(): DataTable; + getDetailedMessage(): string; + getMessage(): string; + getReasons(): string[]; + hasWarning(): boolean; + isError(): boolean; + } + //#endregion //#region DataView