UNPKG

benchling_typescript_sdk

Version:

Typescript SDK for Benchling API

24 lines (19 loc) 661 B
import { BaseClient } from "../BaseClient"; import type { DropdownSummary, Dropdown, DropdownsGetParamQuery } from "../types"; export type Barcode = string; export class DropDown { private client: BaseClient; constructor(client: BaseClient) { this.client = client; } public listDropDowns( parameters: DropdownsGetParamQuery ): AsyncGenerator<DropdownSummary[]> { return this.client.fetchPagesIterator<DropdownSummary>("dropdowns", parameters); } public getDropdown( dropdown_id: string ): Promise<Dropdown> { return this.client.fetchData<Dropdown>(`dropdowns/${dropdown_id}`); } }