UNPKG

3.38 kBTypeScriptView Raw
1/// <reference path="../typings/index.d.ts" />
2import "source-map-support/register";
3declare global {
4 namespace NodeJS {
5 interface Global {
6 XMLHttpRequest: XMLHttpRequest;
7 }
8 }
9}
10import { Observable } from "rxjs/Observable";
11import "rxjs/add/observable/dom/ajax";
12import "rxjs/add/observable/empty";
13import "rxjs/add/observable/forkJoin";
14import "rxjs/add/observable/from";
15import "rxjs/add/observable/throw";
16import "rxjs/add/observable/zip";
17import "rxjs/add/operator/buffer";
18import "rxjs/add/operator/bufferWhen";
19import "rxjs/add/operator/catch";
20import "rxjs/add/operator/concatAll";
21import "rxjs/add/operator/debounceTime";
22import "rxjs/add/operator/delay";
23import "rxjs/add/operator/distinctUntilChanged";
24import "rxjs/add/operator/do";
25import "rxjs/add/operator/filter";
26import "rxjs/add/operator/find";
27import "rxjs/add/operator/mergeMap";
28import "rxjs/add/operator/map";
29import "rxjs/add/operator/multicast";
30import "rxjs/add/operator/publishReplay";
31import "rxjs/add/operator/race";
32import "rxjs/add/operator/reduce";
33import "rxjs/add/operator/skip";
34import "rxjs/add/operator/toArray";
35import "rx-extra/add/operator/throughNodeStream";
36export declare const CONFIG_DEFAULT: {
37 baseIri: string;
38 context: string;
39 dataSourcesMetadataHeadersIri: string;
40 dataSourcesMetadataIri: string;
41 http: {
42 timeout: number;
43 retryLimit: number;
44 retryDelay: number;
45 };
46};
47export interface DataSourcesMetadataHeaderRow {
48 header: string;
49 description: string;
50 example_entry: string;
51 id: string;
52 name: string;
53 "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype": string;
54}
55export declare class BridgeDb {
56 config: any;
57 dataSourceMappings$: any;
58 getTSV: any;
59 private xrefsRequestQueue;
60 private xrefsResponseQueue;
61 constructor(config?: Partial<typeof CONFIG_DEFAULT>);
62 attributes(organism: organism, xrefDataSource: string, xrefIdentifier: string): any;
63 attributeSearch(organism: organism, query: string, attrName?: string): Observable<Xref>;
64 attributeSet(organism: organism): Observable<string[]>;
65 convertXrefDataSourceTo: Function;
66 identifyHeaderNameForXrefDataSource: (input: string) => Observable<string>;
67 dataSourceProperties: (input: string) => Observable<DataSource>;
68 isFreeSearchSupported(organism: organism): Observable<boolean>;
69 isMappingSupported(organism: organism, sourceXrefDataSource: string, targetXrefDataSource: string): Observable<boolean>;
70 organismProperties(organism: organism): Observable<{}>;
71 organisms(): Observable<{}>;
72 private parseXrefRow;
73 search(organism: organism, query: string): Observable<Xref>;
74 sourceDataSources(organism: organism): Observable<DataSource>;
75 targetDataSources(organism: organism): Observable<DataSource>;
76 xrefExists(organism: organism, xrefDataSource: string, xrefIdentifier: string): Observable<boolean>;
77 xrefs(organism: organism, xrefDataSource: string, xrefIdentifier: string, desiredXrefDataSourceOrSources?: string): Observable<Xref>;
78 xrefsBatch: (organism: organism, oneOrMoreXrefDataSources: string | string[], xrefIdentifiers: string[], desiredXrefDataSourceOrSources?: string | string[]) => Observable<{
79 organism: string;
80 inputXrefIdentifier: string;
81 inputXrefDataSource: string;
82 xrefs: Xref[];
83 }>;
84}