forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
usage-report.model.ts
51 lines (43 loc) · 1.06 KB
/
usage-report.model.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
import { autoserialize, inheritSerialization } from 'cerialize';
import { typedObject } from '../../cache/builders/build-decorators';
import { excludeFromEquals } from '../../utilities/equals.decorators';
import { ResourceType } from '../../shared/resource-type';
import { HALResource } from '../../shared/hal-resource.model';
import { USAGE_REPORT } from './usage-report.resource-type';
import { HALLink } from '../../shared/hal-link.model';
import { deserialize, autoserializeAs } from 'cerialize';
/**
* A usage report.
*/
@typedObject
@inheritSerialization(HALResource)
export class UsageReport extends HALResource {
static type = USAGE_REPORT;
/**
* The object type
*/
@excludeFromEquals
@autoserialize
type: ResourceType;
@autoserialize
id: string;
@autoserializeAs('report-type')
reportType: string;
@autoserialize
points: Point[];
@deserialize
_links: {
self: HALLink;
};
}
/**
* A statistics data point.
*/
export interface Point {
id: string;
label: string;
type: string;
values: Array<{
views: number;
}>;
}