1 | /**
|
2 | * `PackageDownloads` lists the number of downloads for a package
|
3 | * in a given time period.
|
4 | *
|
5 | * @see {@link RegistryDownloads}
|
6 | * @see {@link https://github.com/npm/registry/blob/master/docs/download-counts.md#point-values}
|
7 | */
|
8 | export interface PackageDownloads extends RegistryDownloads {
|
9 | /** Package name */
|
10 | readonly package: string;
|
11 | }
|
12 | /**
|
13 | * `RegistryDownloads` lists the number of downloads for the registry
|
14 | * in a given time period.
|
15 | *
|
16 | * @see {@link https://github.com/npm/registry/blob/master/docs/download-counts.md#point-values}
|
17 | */
|
18 | export interface RegistryDownloads {
|
19 | /** Total number of downloads */
|
20 | readonly downloads: number;
|
21 | /** Date of the first day (inclusive) */
|
22 | readonly start: string;
|
23 | /** Date of the last day (inclusive) */
|
24 | readonly end: string;
|
25 | }
|
26 | /**
|
27 | * `DailyPackageDownloads` lists the number of downloads for a package
|
28 | * for each day in a given time period.
|
29 | *
|
30 | * @see {@link DailyRegistryDownloads}
|
31 | * @see {@link https://github.com/npm/registry/blob/master/docs/download-counts.md#ranges}
|
32 | */
|
33 | export interface DailyPackageDownloads extends DailyRegistryDownloads {
|
34 | /** Package name */
|
35 | readonly package: string;
|
36 | }
|
37 | /**
|
38 | * `DailyRegistryDownloads` lists the number of downloads for the registry
|
39 | * for each day in a given time period.
|
40 | *
|
41 | * @see {@link DownloadsPerDay}
|
42 | * @see {@link https://github.com/npm/registry/blob/master/docs/download-counts.md#ranges}
|
43 | */
|
44 | export interface DailyRegistryDownloads {
|
45 | /** Download counts per day */
|
46 | readonly downloads: DownloadsPerDay[];
|
47 | /** Date of the first day (inclusive) */
|
48 | readonly start: string;
|
49 | /** Date of the last day (inclusive) */
|
50 | readonly end: string;
|
51 | }
|
52 | /**
|
53 | * `DownloadsPerDay` lists the number of downloads in a given day.
|
54 | */
|
55 | export interface DownloadsPerDay {
|
56 | /** Total number of downloads in the day */
|
57 | readonly downloads: number;
|
58 | /** Day date */
|
59 | readonly day: string;
|
60 | }
|
61 | //# sourceMappingURL=downloads.d.ts.map |
\ | No newline at end of file |