@neverblink/ohi 0.0.1 → 0.17.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.
- package/LICENSE +201 -0
- package/README.md +17 -0
- package/dist/ajv.d.ts +3 -0
- package/dist/ajv.js +38 -0
- package/dist/catalog-config.schema.json +35 -0
- package/dist/catalog.d.ts +19 -0
- package/dist/catalog.js +189 -0
- package/dist/generated.d.ts +60 -0
- package/dist/generated.js +3 -0
- package/dist/generated_config.d.ts +8 -0
- package/dist/generated_config.js +3 -0
- package/dist/generated_error.d.ts +16 -0
- package/dist/generated_error.js +3 -0
- package/dist/generated_lock.d.ts +27 -0
- package/dist/generated_lock.js +3 -0
- package/dist/generated_lock_error.d.ts +10 -0
- package/dist/generated_lock_error.js +3 -0
- package/dist/generated_search.d.ts +56 -0
- package/dist/generated_search.js +3 -0
- package/dist/generated_search_request.d.ts +17 -0
- package/dist/generated_search_request.js +3 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +3 -0
- package/dist/lock.d.ts +14 -0
- package/dist/lock.js +62 -0
- package/dist/lock.schema.json +111 -0
- package/dist/node.d.ts +10 -0
- package/dist/node.js +76 -0
- package/dist/package.schema.json +225 -0
- package/dist/publication.d.ts +3 -0
- package/dist/publication.js +44 -0
- package/dist/search-request.schema.json +63 -0
- package/dist/search.schema.json +203 -0
- package/package.json +36 -7
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ohi.neverblink.eu/contracts/search-request",
|
|
4
|
+
"$ref": "#/$defs/SearchRequest",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"SearchRequest": {
|
|
7
|
+
"title": "SearchRequest",
|
|
8
|
+
"description": "Query and options for retrieving one page of ontology publications.",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"required": [
|
|
11
|
+
"q"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"page": {
|
|
15
|
+
"title": "page",
|
|
16
|
+
"description": "One-based page number. Omitted means 1.",
|
|
17
|
+
"type": "integer",
|
|
18
|
+
"minimum": 1
|
|
19
|
+
},
|
|
20
|
+
"filter_by": {
|
|
21
|
+
"title": "filter_by",
|
|
22
|
+
"description": "Typesense filter expression over filterable fields.",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
25
|
+
},
|
|
26
|
+
"per_page": {
|
|
27
|
+
"title": "per_page",
|
|
28
|
+
"description": "Maximum hits requested for this page, from 1 through 250. Omitted means 10.",
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"minimum": 1,
|
|
31
|
+
"maximum": 250
|
|
32
|
+
},
|
|
33
|
+
"facet_by": {
|
|
34
|
+
"title": "facet_by",
|
|
35
|
+
"description": "Typesense facet expression over facetable fields.",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
38
|
+
},
|
|
39
|
+
"q": {
|
|
40
|
+
"title": "q",
|
|
41
|
+
"description": "Text query over the configured search fields. Use the wildcard * for browsing.",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
44
|
+
},
|
|
45
|
+
"sort_by": {
|
|
46
|
+
"title": "sort_by",
|
|
47
|
+
"description": "Typesense sort expression. Omitted preserves default search ordering.",
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
50
|
+
},
|
|
51
|
+
"max_facet_values": {
|
|
52
|
+
"title": "max_facet_values",
|
|
53
|
+
"description": "Maximum values returned per facet. Omitted uses the backend default.",
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"minimum": 1
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"title": "Publication search request",
|
|
62
|
+
"description": "Search query, filters, facets, ordering and pagination for ontology publications."
|
|
63
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ohi.neverblink.eu/contracts/search",
|
|
4
|
+
"$ref": "#/$defs/SearchResult",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"SearchResult": {
|
|
7
|
+
"title": "SearchResult",
|
|
8
|
+
"description": "One ordered page of publication summaries, with count, effective paging information and optional facet counts.",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"required": [
|
|
11
|
+
"page",
|
|
12
|
+
"total",
|
|
13
|
+
"per_page",
|
|
14
|
+
"hits",
|
|
15
|
+
"search_cutoff"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"page": {
|
|
19
|
+
"title": "page",
|
|
20
|
+
"description": "Effective one-based page for this response.",
|
|
21
|
+
"type": "integer",
|
|
22
|
+
"minimum": 1
|
|
23
|
+
},
|
|
24
|
+
"total": {
|
|
25
|
+
"title": "total",
|
|
26
|
+
"description": "Matching indexed publications after query and filters, before pagination. May be incomplete when search_cutoff is true. An exact total can exceed the retrieval window.",
|
|
27
|
+
"type": "integer",
|
|
28
|
+
"minimum": 0
|
|
29
|
+
},
|
|
30
|
+
"per_page": {
|
|
31
|
+
"title": "per_page",
|
|
32
|
+
"description": "Effective requested page size, not the number of returned hits.",
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"minimum": 1,
|
|
35
|
+
"maximum": 250
|
|
36
|
+
},
|
|
37
|
+
"hits": {
|
|
38
|
+
"title": "hits",
|
|
39
|
+
"description": "Publication summaries in search-result order.",
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"$ref": "#/$defs/SearchHit"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"facet_counts": {
|
|
46
|
+
"title": "facet_counts",
|
|
47
|
+
"description": "Facet values and counts for the query and filters, independently of hit pagination. The number of returned facet values may be limited.",
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"$ref": "#/$defs/FacetCount"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"search_cutoff": {
|
|
54
|
+
"title": "search_cutoff",
|
|
55
|
+
"description": "Whether search stopped early. When true, hits or total may be incomplete.",
|
|
56
|
+
"type": "boolean"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": true
|
|
60
|
+
},
|
|
61
|
+
"SearchHit": {
|
|
62
|
+
"title": "SearchHit",
|
|
63
|
+
"description": "Summary of one immutable publication.",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"required": [
|
|
66
|
+
"licenses",
|
|
67
|
+
"name",
|
|
68
|
+
"description",
|
|
69
|
+
"base_url",
|
|
70
|
+
"version",
|
|
71
|
+
"formats",
|
|
72
|
+
"title",
|
|
73
|
+
"published_at",
|
|
74
|
+
"namespace"
|
|
75
|
+
],
|
|
76
|
+
"properties": {
|
|
77
|
+
"licenses": {
|
|
78
|
+
"title": "licenses",
|
|
79
|
+
"description": "Reported license names or standard identifiers such as Apache-2.0. Empty means no information supplied. The list specifies neither AND nor OR combination semantics.",
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"name": {
|
|
87
|
+
"title": "name",
|
|
88
|
+
"description": "Short catalog identifier, qualified by namespace. The namespace/name pair identifies the same ontology across releases. URLs must not be derived from this identifier.",
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
91
|
+
},
|
|
92
|
+
"description": {
|
|
93
|
+
"title": "description",
|
|
94
|
+
"description": "Short description of the ontology's domain and intended use.",
|
|
95
|
+
"type": "string",
|
|
96
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
97
|
+
},
|
|
98
|
+
"base_url": {
|
|
99
|
+
"title": "base_url",
|
|
100
|
+
"description": "Permanent absolute URL identifying one exact immutable publication. GET this exact URL returns its publication JSON. Do not append a filename.",
|
|
101
|
+
"type": "string",
|
|
102
|
+
"format": "iri"
|
|
103
|
+
},
|
|
104
|
+
"version": {
|
|
105
|
+
"title": "version",
|
|
106
|
+
"description": "Complete publication version label, including amendments.",
|
|
107
|
+
"type": "string",
|
|
108
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
109
|
+
},
|
|
110
|
+
"formats": {
|
|
111
|
+
"title": "formats",
|
|
112
|
+
"description": "Formats of the publication's available artifacts. Each value identifies both the ontology language and serialization syntax, as in artifact.format.",
|
|
113
|
+
"type": "array",
|
|
114
|
+
"minItems": 1,
|
|
115
|
+
"items": {
|
|
116
|
+
"$ref": "#/$defs/Format"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"title": {
|
|
120
|
+
"title": "title",
|
|
121
|
+
"description": "Display title of the ontology.",
|
|
122
|
+
"type": "string",
|
|
123
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
124
|
+
},
|
|
125
|
+
"published_at": {
|
|
126
|
+
"title": "published_at",
|
|
127
|
+
"description": "First successful Hub publication time for this immutable release. Backend emits UTC date-time text with Z. Consumers accept timezone-bearing RFC 3339 text. Fixed for the lifetime of this publication. Not an upstream release date.",
|
|
128
|
+
"type": "string",
|
|
129
|
+
"format": "date-time"
|
|
130
|
+
},
|
|
131
|
+
"namespace": {
|
|
132
|
+
"title": "namespace",
|
|
133
|
+
"description": "Namespace qualifying the ontology name, such as w3c in w3c/prov-o.",
|
|
134
|
+
"type": "string",
|
|
135
|
+
"pattern": "^[\\s\\S]*\\S"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"additionalProperties": true
|
|
139
|
+
},
|
|
140
|
+
"FacetCount": {
|
|
141
|
+
"title": "FacetCount",
|
|
142
|
+
"description": "Counts for the returned values of one indexed field.",
|
|
143
|
+
"type": "object",
|
|
144
|
+
"required": [
|
|
145
|
+
"field_name",
|
|
146
|
+
"counts"
|
|
147
|
+
],
|
|
148
|
+
"properties": {
|
|
149
|
+
"field_name": {
|
|
150
|
+
"title": "field_name",
|
|
151
|
+
"description": "Indexed field used for this facet.",
|
|
152
|
+
"type": "string"
|
|
153
|
+
},
|
|
154
|
+
"counts": {
|
|
155
|
+
"title": "counts",
|
|
156
|
+
"description": "Value counts in search-result order.",
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": {
|
|
159
|
+
"$ref": "#/$defs/FacetValueCount"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"additionalProperties": true
|
|
164
|
+
},
|
|
165
|
+
"FacetValueCount": {
|
|
166
|
+
"title": "FacetValueCount",
|
|
167
|
+
"description": "A facet value and its matching-publication count.",
|
|
168
|
+
"type": "object",
|
|
169
|
+
"required": [
|
|
170
|
+
"value",
|
|
171
|
+
"count"
|
|
172
|
+
],
|
|
173
|
+
"properties": {
|
|
174
|
+
"value": {
|
|
175
|
+
"title": "value",
|
|
176
|
+
"description": "Facet value or range label.",
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
"count": {
|
|
180
|
+
"title": "count",
|
|
181
|
+
"description": "Number of matching publications for this facet value or range.",
|
|
182
|
+
"type": "integer",
|
|
183
|
+
"minimum": 0
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"additionalProperties": true
|
|
187
|
+
},
|
|
188
|
+
"Format": {
|
|
189
|
+
"title": "Format",
|
|
190
|
+
"description": "A combination of ontology language and syntax.",
|
|
191
|
+
"type": "string",
|
|
192
|
+
"enum": [
|
|
193
|
+
"owl-turtle",
|
|
194
|
+
"owl-rdfxml",
|
|
195
|
+
"rdfs-turtle",
|
|
196
|
+
"linkml-yaml",
|
|
197
|
+
"ossie-yaml"
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"title": "Publication search result",
|
|
202
|
+
"description": "One page of ungrouped publication search results, with the matching count and effective pagination settings and optional facet counts."
|
|
203
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neverblink/ohi",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"license": "
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
"version": "0.17.1",
|
|
4
|
+
"description": "Ohi catalog search, publication inspection and artifact retrieval.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/NeverBlink-OSS/linkml-scala.git",
|
|
9
|
+
"directory": "ohi/typescript"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=22"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": "./dist/index.js",
|
|
20
|
+
"./node": "./dist/node.js"
|
|
21
|
+
},
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
9
26
|
"scripts": {
|
|
10
|
-
"
|
|
27
|
+
"build": "tsc",
|
|
28
|
+
"test": "npm run build && node --test test/*.test.mjs",
|
|
29
|
+
"test:browser": "npm run build && node --test test/browser.mjs"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"ajv": "8.20.0",
|
|
33
|
+
"ajv-formats": "3.0.1"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "22.20.5",
|
|
37
|
+
"esbuild": "0.28.2",
|
|
38
|
+
"playwright-core": "1.64.0",
|
|
39
|
+
"typescript": "7.0.2"
|
|
11
40
|
}
|
|
12
41
|
}
|