databaseSources#
DatabaseOption#
One entry of the database selector.
Properties#
available#
Whether this database can be searched. A database that cannot is still listed, so a user who configured it can see it is there and unusable rather than wondering where it went.
id#
Routing key. Also the value the selector holds.
label#
What the user sees.
origin#
DatabaseSearchPage#
A page of search results.
Properties#
compounds#
total_count#
DatabaseSource#
A second place the viewer can read compounds from, supplied by the host.
The shared package knows nothing about how a host reaches its own databases, so a caller that has more than the remote source passes one of these in.
Methods#
compound()#
Parameters#
| Parameter | Type |
|---|---|
databaseId |
string |
compoundId |
string |
Returns#
Promise<CompoundDetail | null>
listDatabases()#
Returns#
Promise<DatabaseOption[]>
search()#
Parameters#
| Parameter | Type |
|---|---|
databaseId |
string |
query |
string |
offset |
number |
limit |
number |
Returns#
Promise<DatabaseSearchPage>
spectrum()#
Parameters#
| Parameter | Type |
|---|---|
databaseId |
string |
compoundId |
string |
nucleus |
string |
Returns#
Promise<SpectrumResponse | null>
DatabaseOrigin#
Where a database in the selector comes from.
remote databases are served by the terraquant.tech nmrdb routes and are the
same for everyone. registry databases are the ones configured in the app's
own database settings, so they differ per installation.