-
Notifications
You must be signed in to change notification settings - Fork 0
/
appStatus.model.ts
51 lines (48 loc) · 1.15 KB
/
appStatus.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 { markdown } from './markdown';
import { Resource } from './resource.model';
/**
* The status related to an app's version.
*/
export class AppStatus extends Resource {
/**
* The version that generated the status.
*/
version: string;
/**
* Whether the app is in maintenance mode.
*/
inMaintenance: boolean;
/**
* Whether the app must be updated.
*/
mustUpdate: boolean;
/**
* The status-related content to display (markdown).
*/
content: markdown;
/**
* The latest version of the app.
*/
latestVersion: string;
load(x: any): void {
super.load(x);
this.version = this.clean(x.version, String);
this.inMaintenance = this.clean(x.inMaintenance, Boolean);
this.mustUpdate = this.clean(x.mustUpdate, Boolean);
this.content = this.clean(x.content, String);
this.latestVersion = this.clean(x.latestVersion, String);
}
}
/**
* The internal information about the status of an app's version.
*/
export interface InternalAppVersionStatus {
/**
* The targeted app version.
*/
version: string;
/**
* The message to display reated to this version, if any.
*/
message?: string;
}