diff --git a/src/types/Client.d.ts b/src/types/Client.d.ts index 96786a5d7..b024c5159 100644 --- a/src/types/Client.d.ts +++ b/src/types/Client.d.ts @@ -49,9 +49,24 @@ interface StreamApi document: StreamFn } +interface MetricsResponse { + value: T + metrics: { + 'x-compute-ops': number + 'x-byte-read-ops': number + 'x-byte-write-ops': number + 'x-query-time': number + 'x-txn-retries': number + } +} + export default class Client { constructor(opts?: ClientConfig) - query(expr: ExprArg, options?: QueryOptions): Promise + query(expr: ExprArg, options?: QueryOptions): Promise | Promise> + queryWithMetrics( + expr: ExprArg, + options?: QueryOptions + ): Promise> paginate(expr: Expr, params?: object, options?: QueryOptions): PageHelper ping(scope?: string, timeout?: number): Promise close(opts?: { force?: boolean }): Promise