benchling_typescript_sdk
Version:
Typescript SDK for Benchling API
20 lines (18 loc) • 663 B
text/typescript
import { BaseClient } from "../BaseClient";
import type { AssayRun, AssayRunUpdate } from "../types";
export class AssayRuns {
private client: BaseClient;
constructor(client: BaseClient) {
this.client = client;
}
public async updateAssayRun(
assayRunId: string,
assayRunUpdate: AssayRunUpdate
): Promise<AssayRun> {
return this.client.patchData<AssayRun>(`assay-runs/${assayRunId}`, assayRunUpdate, {});
// return this.client.postData<AssayRun>(`assay-runs/${assayRunId}`, assayRunUpdate, {});
}
public async getAssayRun(id: string): Promise<AssayRun> {
return this.client.fetchData<AssayRun>(`assay-runs/${id}`, {});
}
}