-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
SearchResult.ts
64 lines (56 loc) · 1.08 KB
/
SearchResult.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
export interface SearchResult {
results: Result[];
total: number;
}
interface Result {
/** The package flags (deprecated, unstable, insecure) */
flags?: Flags;
/** The package data which contains the name, version and other useful information */
package: Package;
/** The package score */
score: Score;
/** The computed search score (from Elasticsearch) */
searchScore: number;
}
interface Author {
email?: string;
name: string;
url?: string;
username?: string;
}
interface Detail {
maintenance: number;
popularity: number;
quality: number;
}
interface Flags {
deprecated?: boolean;
insecure?: boolean;
unstable?: boolean;
}
interface Links {
bugs?: string;
homepage?: string;
npm: string;
repository?: string;
}
interface Package {
author?: Author;
date: string;
description: string;
keywords?: string[];
links: Links;
maintainers: Publisher[];
name: string;
publisher: Publisher;
scope: string;
version: string;
}
interface Publisher {
email: string;
username: string;
}
interface Score {
detail: Detail;
final: number;
}