From 29a5211adc51b50375dc15462c54215f8007a701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20C=C3=B4t=C3=A9?= Date: Wed, 25 Oct 2023 16:54:23 -0400 Subject: [PATCH] Add from/to arguments to getObject --- js/src/grpc-client.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/src/grpc-client.ts b/js/src/grpc-client.ts index 945683b..4727e81 100644 --- a/js/src/grpc-client.ts +++ b/js/src/grpc-client.ts @@ -261,21 +261,27 @@ export class DateiLagerGrpcClient { * * @param project The id of the project. * @param path The path of the object. + * @param from The project version to start from. + * @param to The project version to end at. * @returns The object at the given path or undefined if it does not exist. */ - public async getObject(project: bigint, path: string): Promise { + public async getObject(project: bigint, path: string, from?: bigint, to?: bigint): Promise { return await trace( "dateilager-grpc-client.get-object", { attributes: { "dl.project": String(project), "dl.path": path, + "dl.from_version": String(from), + "dl.to_version": String(to), }, }, async () => { const call = this._client.get( { project, + fromVersion: from, + toVersion: to, queries: [ { path,