@jax-data-science/api-clients 0.0.1-0 → 0.0.1-a.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,80 @@
1
+ export interface OntologyConfig {
2
+ name: string;
3
+ prefix: string;
4
+ github: {
5
+ api: string;
6
+ home: string;
7
+ };
8
+ home: string;
9
+ api: {
10
+ docs: string;
11
+ base: string;
12
+ };
13
+ base_file: string;
14
+ international: boolean;
15
+ description: string;
16
+ }
17
+ export declare enum Ontology {
18
+ HP = "HP",
19
+ MONDO = "MONDO",
20
+ MP = "MP",
21
+ CL = "CL",
22
+ MAXO = "MAXO"
23
+ }
24
+ export interface OntologyTerm {
25
+ id: string;
26
+ name: string;
27
+ }
28
+ export interface OLSTerm {
29
+ appearsIn: string[];
30
+ curie: string;
31
+ definedBy: string[];
32
+ definition?: Array<{
33
+ type: string[];
34
+ value: string;
35
+ axioms?: Array<{
36
+ [key: string]: string;
37
+ }>;
38
+ }>;
39
+ definitionProperty?: string;
40
+ directAncestor?: string[];
41
+ directParent?: Array<string>;
42
+ hasDirectChildren?: boolean;
43
+ hasDirectParents?: boolean;
44
+ hasHierarchicalChildren?: boolean;
45
+ hasHierarchicalParents?: boolean;
46
+ hierarchicalAncestor?: string[];
47
+ hierarchicalParent?: Array<string | {
48
+ type: string[];
49
+ value: string;
50
+ axioms?: Array<{
51
+ [key: string]: string;
52
+ }>;
53
+ }>;
54
+ hierarchicalProperty?: string;
55
+ imported?: boolean;
56
+ iri: string;
57
+ isDefiningOntology?: boolean;
58
+ isObsolete?: boolean;
59
+ isPreferredRoot?: boolean;
60
+ label?: string[];
61
+ linkedEntities?: Record<string, any>;
62
+ linksTo?: string[];
63
+ numDescendants?: number;
64
+ numHierarchicalDescendants?: number;
65
+ ontologyId?: string;
66
+ ontologyIri?: string;
67
+ ontologyPreferredPrefix?: string;
68
+ searchableAnnotationValues?: any[];
69
+ shortForm?: string;
70
+ type?: string[];
71
+ [key: string]: any;
72
+ }
73
+ export interface OLSResponse {
74
+ page: number;
75
+ numElements: number;
76
+ totalPages: number;
77
+ totalElements: number;
78
+ elements: OLSTerm[];
79
+ facetFieldsToCounts?: Record<string, any>;
80
+ }
@@ -0,0 +1,11 @@
1
+ import { Observable } from 'rxjs';
2
+ import { Ontology, OntologyTerm } from './ontology.model';
3
+ import { CollectionResponse, Response } from '../../models/response';
4
+ export declare abstract class OntologyService {
5
+ abstract search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;
6
+ abstract term(id: string): Observable<Response<OntologyTerm>>;
7
+ abstract parents(id: string): Observable<CollectionResponse<OntologyTerm>>;
8
+ abstract children(id: string): Observable<CollectionResponse<OntologyTerm>>;
9
+ abstract ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;
10
+ abstract descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;
11
+ }
@@ -1,9 +1,10 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Ontology, OntologyTerm } from './ontology.model';
4
- import { CollectionResponse, Response } from '../models/response';
4
+ import { CollectionResponse, Response } from '../../models/response';
5
+ import { OntologyService } from './ontology.service.base';
5
6
  import * as i0 from "@angular/core";
6
- export declare class OntologyService {
7
+ export declare class JaxOntologyService extends OntologyService {
7
8
  private httpClient;
8
9
  config_location: string;
9
10
  private config;
@@ -43,14 +44,10 @@ export declare class OntologyService {
43
44
  * @param id - the term ID
44
45
  */
45
46
  descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;
46
- /**
47
- * Get the ontology from curie
48
- */
49
- ontologyFromCurie(curie: string): Ontology;
50
47
  /**
51
48
  * Get the ontology api base url configuration
52
49
  **/
53
50
  ontologyBaseResolver(ontology: Ontology): string;
54
- static ɵfac: i0.ɵɵFactoryDeclaration<OntologyService, never>;
55
- static ɵprov: i0.ɵɵInjectableDeclaration<OntologyService>;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<JaxOntologyService, never>;
52
+ static ɵprov: i0.ɵɵInjectableDeclaration<JaxOntologyService>;
56
53
  }
@@ -0,0 +1,22 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { OntologyService } from './ontology.service.base';
3
+ import { Observable } from 'rxjs';
4
+ import { OLSTerm, Ontology, OntologyTerm } from './ontology.model';
5
+ import { CollectionResponse, Response } from '../../models/response';
6
+ import * as i0 from "@angular/core";
7
+ export declare class OLSOntologyService extends OntologyService {
8
+ private httpClient;
9
+ private OLS_SEARCH_BASE;
10
+ private OLS_ENTITY_BASE;
11
+ private PURL_BASE;
12
+ constructor(httpClient: HttpClient);
13
+ term(id: string): Observable<Response<OntologyTerm>>;
14
+ search(query: string, limit: number, ontology: Ontology): Observable<CollectionResponse<OntologyTerm>>;
15
+ parents(id: string): Observable<CollectionResponse<OntologyTerm>>;
16
+ children(id: string): Observable<CollectionResponse<OntologyTerm>>;
17
+ ancestors(id: string): Observable<CollectionResponse<OntologyTerm>>;
18
+ descendants(id: string): Observable<CollectionResponse<OntologyTerm>>;
19
+ mapOLSTermToOntologyTerm(olsTerm: OLSTerm): OntologyTerm;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<OLSOntologyService, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<OLSOntologyService>;
22
+ }
@@ -0,0 +1,5 @@
1
+ import { Ontology } from "./ontology.model";
2
+ /**
3
+ * Get the ontology from curie
4
+ */
5
+ export declare function ontologyFromCurie(curie: string): Ontology;
@@ -0,0 +1,5 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export interface IsaDataServiceConfig {
3
+ baseUrl: string;
4
+ }
5
+ export declare const ISA_DATA_SERVICE_CONFIG: InjectionToken<IsaDataServiceConfig>;
package/package.json CHANGED
@@ -1,18 +1,16 @@
1
1
  {
2
2
  "name": "@jax-data-science/api-clients",
3
- "version": "0.0.1-0",
4
- "dependencies": {
5
- "@microsoft/fetch-event-source": "^2.0.1",
6
- "rxjs": "^7.8.0",
7
- "tslib": "^2.3.0"
8
- },
3
+ "version": "0.0.1-a.1",
9
4
  "peerDependencies": {
10
- "@angular/common": "^19.1.0",
11
- "@angular/core": "^19.1.0"
5
+ "@angular/common": "^19.2.14",
6
+ "@angular/core": "^19.2.14",
7
+ "rxjs": "^7.8.0",
8
+ "@microsoft/fetch-event-source": "^2.0.1"
12
9
  },
13
10
  "sideEffects": false,
14
11
  "publishConfig": {
15
- "access": "public"
12
+ "directory": "../../dist/libs/api-clients",
13
+ "linkDirectory": false
16
14
  },
17
15
  "module": "fesm2022/jax-data-science-api-clients.mjs",
18
16
  "typings": "index.d.ts",
@@ -24,5 +22,8 @@
24
22
  "types": "./index.d.ts",
25
23
  "default": "./fesm2022/jax-data-science-api-clients.mjs"
26
24
  }
25
+ },
26
+ "dependencies": {
27
+ "tslib": "^2.3.0"
27
28
  }
28
29
  }
@@ -1,27 +0,0 @@
1
- export interface OntologyConfig {
2
- name: string;
3
- prefix: string;
4
- github: {
5
- api: string;
6
- home: string;
7
- };
8
- home: string;
9
- api: {
10
- docs: string;
11
- base: string;
12
- };
13
- base_file: string;
14
- international: boolean;
15
- description: string;
16
- }
17
- export declare enum Ontology {
18
- HP = "HP",
19
- MONDO = "MONDO",
20
- MP = "MP",
21
- CL = "CL",
22
- MAXO = "MAXO"
23
- }
24
- export interface OntologyTerm {
25
- id: string;
26
- name: string;
27
- }
File without changes