1 | /**
|
2 | * `SearchCriteria` represents the available search criteria.
|
3 | *
|
4 | * @see {@link https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md#get-v1search}
|
5 | */
|
6 | export interface SearchCriteria {
|
7 | /**
|
8 | * Query text
|
9 | *
|
10 | * @remarks
|
11 | * The following special text attributes can be used to refine results:
|
12 | *
|
13 | * - `author:<name>`: show packages from the given author
|
14 | * (for example, `author:someone`)
|
15 | *
|
16 | * - `maintainer:<name>`: show packages with the given maintainer
|
17 | * (for example, `maintainer:someone`)
|
18 | *
|
19 | * - `keywords:<keyword list>`: show packages matching the given keyword(s);
|
20 | * separators `,`, `+` and `,-` mean respectively `OR`, `AND` and `NOT`
|
21 | * (for example, use `keywords:foo,bar+baz,-quux` to include keywords `foo`
|
22 | * or `bar` and `baz` but not `quux`)
|
23 | *
|
24 | * - `not:unstable`: exclude unstable packages (version `<1.0.0`)
|
25 | *
|
26 | * - `not:insecure`: exclude insecure packages
|
27 | *
|
28 | * - `is:unstable`: include only unstable packages (version `<1.0.0`)
|
29 | *
|
30 | * - `is:insecure`: include only insecure packages
|
31 | *
|
32 | * - `boost-exact:<true/false>`: boost packages with exact name match
|
33 | * (default: `true`)
|
34 | */
|
35 | readonly text?: string;
|
36 | /** Number of results to return (from `0` to `250`; default: `20` on the npm registry) */
|
37 | readonly size?: number;
|
38 | /** Return results from this offset */
|
39 | readonly from?: number;
|
40 | /** Package quality influence on results (from `0.0` to `1.0`) */
|
41 | readonly quality?: number;
|
42 | /** Package popularity influence on results (from `0.0` to `1.0`) */
|
43 | readonly popularity?: number;
|
44 | /** Package maintenance influence on results (from `0.0` to `1.0`) */
|
45 | readonly maintenance?: number;
|
46 | }
|
47 | //# sourceMappingURL=search-criteria.d.ts.map |
\ | No newline at end of file |