warframe-worldstate-parser 2.32.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/lib/WorldState.js +60 -94
- package/lib/models/Alert.js +18 -44
- package/lib/models/CambionCycle.js +8 -12
- package/lib/models/CetusCycle.js +34 -54
- package/lib/models/ChallengeInstance.js +11 -14
- package/lib/models/ConclaveChallenge.js +24 -44
- package/lib/models/ConstructionProgress.js +10 -22
- package/lib/models/DailyDeal.js +15 -34
- package/lib/models/DarkSector.js +14 -25
- package/lib/models/DarkSectorBattle.js +6 -8
- package/lib/models/DuviriCycle.js +9 -10
- package/lib/models/EarthCycle.js +36 -35
- package/lib/models/Fissure.js +36 -44
- package/lib/models/FlashSale.js +17 -37
- package/lib/models/GlobalUpgrade.js +23 -41
- package/lib/models/Invasion.js +37 -79
- package/lib/models/Kuva.js +20 -26
- package/lib/models/Mission.js +28 -38
- package/lib/models/News.js +34 -54
- package/lib/models/Nightwave.js +22 -48
- package/lib/models/NightwaveChallenge.js +15 -19
- package/lib/models/PersistentEnemy.js +21 -30
- package/lib/models/Reward.js +18 -20
- package/lib/models/SentientOutpost.js +11 -12
- package/lib/models/Simaris.js +9 -21
- package/lib/models/Sortie.js +36 -54
- package/lib/models/SortieVariant.js +23 -25
- package/lib/models/SteelPathOffering.js +26 -9
- package/lib/models/SyndicateJob.js +20 -30
- package/lib/models/SyndicateMission.js +22 -52
- package/lib/models/VallisCycle.js +37 -45
- package/lib/models/VoidTrader.js +35 -54
- package/lib/models/VoidTraderItem.js +5 -8
- package/lib/models/VoidTraderSchedule.js +7 -6
- package/lib/models/WeeklyChallenge.js +9 -17
- package/lib/models/WorldEvent.js +49 -74
- package/lib/models/WorldstateObject.js +23 -34
- package/lib/models/ZarimanCycle.js +34 -54
- package/lib/supporting/Dependency.js +2 -11
- package/lib/supporting/DuviriChoice.js +1 -5
- package/lib/supporting/ExternalMission.js +2 -6
- package/lib/supporting/MarkdownSettings.js +15 -19
- package/lib/supporting/RewardData.js +4 -6
- package/lib/supporting/RewardTypes.js +2 -4
- package/lib/utilities/integrity.js +11 -0
- package/lib/utilities/timeDate.js +16 -18
- package/lib/utilities/translation.js +188 -56
- package/main.js +2 -2
- package/package.json +4 -6
- package/types/lib/WorldState.d.ts +39 -28
- package/types/lib/models/Alert.d.ts +13 -24
- package/types/lib/models/CambionCycle.d.ts +5 -10
- package/types/lib/models/CetusCycle.d.ts +8 -26
- package/types/lib/models/ChallengeInstance.d.ts +7 -9
- package/types/lib/models/ConclaveChallenge.d.ts +11 -24
- package/types/lib/models/ConstructionProgress.d.ts +5 -16
- package/types/lib/models/DailyDeal.d.ts +7 -26
- package/types/lib/models/DarkSector.d.ts +11 -22
- package/types/lib/models/DarkSectorBattle.d.ts +3 -6
- package/types/lib/models/DuviriCycle.d.ts +5 -11
- package/types/lib/models/EarthCycle.d.ts +40 -17
- package/types/lib/models/Fissure.d.ts +10 -17
- package/types/lib/models/FlashSale.d.ts +8 -29
- package/types/lib/models/GlobalUpgrade.d.ts +8 -27
- package/types/lib/models/Invasion.d.ts +18 -53
- package/types/lib/models/Kuva.d.ts +10 -21
- package/types/lib/models/Mission.d.ts +11 -23
- package/types/lib/models/News.d.ts +18 -31
- package/types/lib/models/Nightwave.d.ts +12 -29
- package/types/lib/models/NightwaveChallenge.d.ts +10 -15
- package/types/lib/models/PersistentEnemy.d.ts +9 -20
- package/types/lib/models/Reward.d.ts +34 -18
- package/types/lib/models/SentientOutpost.d.ts +9 -13
- package/types/lib/models/Simaris.d.ts +6 -17
- package/types/lib/models/Sortie.d.ts +16 -25
- package/types/lib/models/SortieVariant.d.ts +13 -15
- package/types/lib/models/SteelPathOffering.d.ts +5 -8
- package/types/lib/models/SyndicateJob.d.ts +13 -14
- package/types/lib/models/SyndicateMission.d.ts +9 -22
- package/types/lib/models/VallisCycle.d.ts +28 -18
- package/types/lib/models/VoidTrader.d.ts +8 -21
- package/types/lib/models/VoidTraderItem.d.ts +4 -6
- package/types/lib/models/VoidTraderSchedule.d.ts +5 -8
- package/types/lib/models/WeeklyChallenge.d.ts +5 -14
- package/types/lib/models/WorldEvent.d.ts +38 -52
- package/types/lib/models/WorldstateObject.d.ts +46 -24
- package/types/lib/models/ZarimanCycle.d.ts +9 -27
- package/types/lib/supporting/Dependency.d.ts +2 -8
- package/types/lib/supporting/DuviriChoice.d.ts +1 -2
- package/types/lib/supporting/ExternalMission.d.ts +3 -7
- package/types/lib/supporting/MarkdownSettings.d.ts +29 -15
- package/types/lib/supporting/RewardData.d.ts +8 -2
- package/types/lib/supporting/RewardTypes.d.ts +2 -2
- package/types/lib/utilities/integrity.d.ts +1 -0
- package/types/lib/utilities/timeDate.d.ts +19 -12
- package/types/lib/utilities/translation.d.ts +188 -23
- package/types/main.d.ts +2 -4
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {object} ParserClass class for parsing data
|
|
4
|
+
* @param {Array<BaseContentObject>} dataArray array of raw data
|
|
5
|
+
* @param {Dependency} deps shared dependency object
|
|
6
|
+
* @param {*} [uniqueField] field to treat as unique
|
|
7
|
+
* @returns {WorldstateObject[]} array of parsed objects
|
|
8
|
+
*/
|
|
9
|
+
export function parseArray(ParserClass: object, dataArray: Array<BaseContentObject>, deps: Dependency, uniqueField?: any): WorldstateObject[];
|
|
10
|
+
/**
|
|
11
|
+
* Parses Warframe Worldstate JSON
|
|
12
|
+
*/
|
|
13
|
+
export default class WorldState {
|
|
3
14
|
/**
|
|
4
15
|
* Generates the worldstate json as a string into usable objects
|
|
5
16
|
* @param {string} json The worldstate JSON string
|
|
@@ -134,29 +145,29 @@ declare class WorldState {
|
|
|
134
145
|
steelPath: SteelPathOffering;
|
|
135
146
|
duviriCycle: DuviriCycle;
|
|
136
147
|
}
|
|
137
|
-
import
|
|
138
|
-
import
|
|
139
|
-
import
|
|
140
|
-
import
|
|
141
|
-
import
|
|
142
|
-
import
|
|
143
|
-
import
|
|
144
|
-
import
|
|
145
|
-
import
|
|
146
|
-
import
|
|
147
|
-
import
|
|
148
|
-
import
|
|
149
|
-
import
|
|
150
|
-
import
|
|
151
|
-
import
|
|
152
|
-
import
|
|
153
|
-
import
|
|
154
|
-
import
|
|
155
|
-
import
|
|
156
|
-
import
|
|
157
|
-
import
|
|
158
|
-
import
|
|
159
|
-
import
|
|
160
|
-
import
|
|
161
|
-
import
|
|
162
|
-
import
|
|
148
|
+
import Dependency from './supporting/Dependency.js';
|
|
149
|
+
import News from './models/News.js';
|
|
150
|
+
import WorldEvent from './models/WorldEvent.js';
|
|
151
|
+
import Alert from './models/Alert.js';
|
|
152
|
+
import SyndicateMission from './models/SyndicateMission.js';
|
|
153
|
+
import Fissure from './models/Fissure.js';
|
|
154
|
+
import GlobalUpgrade from './models/GlobalUpgrade.js';
|
|
155
|
+
import FlashSale from './models/FlashSale.js';
|
|
156
|
+
import Invasion from './models/Invasion.js';
|
|
157
|
+
import DarkSector from './models/DarkSector.js';
|
|
158
|
+
import VoidTrader from './models/VoidTrader.js';
|
|
159
|
+
import DailyDeal from './models/DailyDeal.js';
|
|
160
|
+
import Simaris from './models/Simaris.js';
|
|
161
|
+
import ConclaveChallenge from './models/ConclaveChallenge.js';
|
|
162
|
+
import PersistentEnemy from './models/PersistentEnemy.js';
|
|
163
|
+
import EarthCycle from './models/EarthCycle.js';
|
|
164
|
+
import CetusCycle from './models/CetusCycle.js';
|
|
165
|
+
import CambionCycle from './models/CambionCycle.js';
|
|
166
|
+
import ZarimanCycle from './models/ZarimanCycle.js';
|
|
167
|
+
import WeeklyChallenge from './models/WeeklyChallenge.js';
|
|
168
|
+
import ConstructionProgress from './models/ConstructionProgress.js';
|
|
169
|
+
import VallisCycle from './models/VallisCycle.js';
|
|
170
|
+
import Nightwave from './models/Nightwave.js';
|
|
171
|
+
import SentientOutpost from './models/SentientOutpost.js';
|
|
172
|
+
import SteelPathOffering from './models/SteelPathOffering.js';
|
|
173
|
+
import DuviriCycle from './models/DuviriCycle.js';
|
|
@@ -1,33 +1,21 @@
|
|
|
1
|
-
export = Alert;
|
|
2
1
|
/**
|
|
3
2
|
* Represents an alert
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class Alert extends WorldstateObject {
|
|
7
6
|
/**
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {MarkdownSettings} mdConfig The markdown settings
|
|
10
|
-
* @param {Translator} translator The string translator
|
|
11
|
-
* @param {TimeDateFunctions} timeDate The time and date functions
|
|
12
|
-
* @param {Mission} Mission The Mission parser
|
|
13
|
-
* @param {Reward} Reward The Reward parser
|
|
7
|
+
* @param {object} data The alert data
|
|
14
8
|
* @param {string} locale Locale to use for translations
|
|
15
9
|
*/
|
|
16
|
-
constructor(data:
|
|
17
|
-
/**
|
|
18
|
-
* The markdown settings
|
|
19
|
-
* @type {MarkdownSettings}
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
private mdConfig;
|
|
10
|
+
constructor(data: object, { locale }?: string);
|
|
23
11
|
/**
|
|
24
12
|
* The mission that the players have to complete
|
|
25
13
|
* @type {Mission}
|
|
26
14
|
*/
|
|
27
|
-
mission:
|
|
15
|
+
mission: Mission;
|
|
28
16
|
/**
|
|
29
17
|
* ETA string (at time of object creation)
|
|
30
|
-
* @type {
|
|
18
|
+
* @type {string}
|
|
31
19
|
*/
|
|
32
20
|
eta: string;
|
|
33
21
|
/**
|
|
@@ -37,28 +25,29 @@ declare class Alert extends WorldstateObject {
|
|
|
37
25
|
rewardTypes: Array<string>;
|
|
38
26
|
/**
|
|
39
27
|
* A tag that DE occasionally provides, such as `LotusGift`
|
|
40
|
-
* @type {
|
|
28
|
+
* @type {string}
|
|
41
29
|
*/
|
|
42
30
|
tag: string;
|
|
43
31
|
/**
|
|
44
32
|
* Get the alert's description text
|
|
45
|
-
* @returns {string}
|
|
33
|
+
* @returns {string} the description
|
|
46
34
|
*/
|
|
47
35
|
getDescription(): string;
|
|
48
36
|
/**
|
|
49
37
|
* Get the alert's reward
|
|
50
|
-
* @returns {Reward}
|
|
38
|
+
* @returns {Reward} the reward
|
|
51
39
|
*/
|
|
52
40
|
getReward(): Reward;
|
|
53
41
|
/**
|
|
54
42
|
* Get a string indicating how much time is left before the alert expires
|
|
55
|
-
* @returns {string}
|
|
43
|
+
* @returns {string} the time left
|
|
56
44
|
*/
|
|
57
45
|
getETAString(): string;
|
|
58
46
|
/**
|
|
59
47
|
* Get an array containing the types of all of the alert's rewards
|
|
60
|
-
* @returns {Array.<string>}
|
|
48
|
+
* @returns {Array.<string>} an array containing the types of all of the alert's rewards
|
|
61
49
|
*/
|
|
62
50
|
getRewardTypes(): Array<string>;
|
|
63
51
|
}
|
|
64
|
-
import WorldstateObject
|
|
52
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
53
|
+
import Mission from './Mission.js';
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
export = CambionCycle;
|
|
2
1
|
/**
|
|
3
2
|
* Represents the current Cambion Drift Fass/Vome Cycle
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
* @property {string} timeLeft time rendering of amount of time left
|
|
6
5
|
*/
|
|
7
|
-
|
|
6
|
+
export default class CambionCycle extends WorldstateObject {
|
|
8
7
|
/**
|
|
9
8
|
* @param {CetusCycle} cetusCycle Match data from cetus cycle for data
|
|
10
|
-
* @param {Object} deps The dependencies object
|
|
11
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
12
9
|
*/
|
|
13
|
-
constructor(cetusCycle: CetusCycle
|
|
14
|
-
timeDate: TimeDateFunctions;
|
|
15
|
-
});
|
|
10
|
+
constructor(cetusCycle: CetusCycle);
|
|
16
11
|
state: string;
|
|
17
12
|
active: string;
|
|
18
13
|
id: string;
|
|
19
14
|
/**
|
|
20
15
|
* Get whether the event has expired
|
|
21
|
-
* @returns {boolean}
|
|
16
|
+
* @returns {boolean} whether the event has expired
|
|
22
17
|
*/
|
|
23
18
|
getExpired(): boolean;
|
|
24
19
|
}
|
|
25
|
-
import WorldstateObject
|
|
20
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,31 +1,12 @@
|
|
|
1
|
-
export = CetusCycle;
|
|
2
1
|
/**
|
|
3
2
|
* Represents the current Earth Day/Night Cycle
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class CetusCycle extends WorldstateObject {
|
|
7
6
|
/**
|
|
8
7
|
* @param {Date} bountiesEndDate The end date for Ostron bounties
|
|
9
|
-
* @param {Object} deps The dependencies object
|
|
10
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
11
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
12
8
|
*/
|
|
13
|
-
constructor(bountiesEndDate: Date
|
|
14
|
-
mdConfig: MarkdownSettings;
|
|
15
|
-
timeDate: TimeDateFunctions;
|
|
16
|
-
});
|
|
17
|
-
/**
|
|
18
|
-
* The markdown settings
|
|
19
|
-
* @type {MarkdownSettings}
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
private mdConfig;
|
|
23
|
-
/**
|
|
24
|
-
* The end of the Ostron bounties timer (marks the end of night)
|
|
25
|
-
* @type {Date}
|
|
26
|
-
* @private
|
|
27
|
-
*/
|
|
28
|
-
private bountiesEndDate;
|
|
9
|
+
constructor(bountiesEndDate: Date);
|
|
29
10
|
/**
|
|
30
11
|
* Whether it's daytime
|
|
31
12
|
* @type {boolean}
|
|
@@ -50,16 +31,17 @@ declare class CetusCycle extends WorldstateObject {
|
|
|
50
31
|
shortString: string;
|
|
51
32
|
/**
|
|
52
33
|
* Get whether or not the event has expired
|
|
53
|
-
* @returns {boolean}
|
|
34
|
+
* @returns {boolean} whether the event has expired
|
|
54
35
|
*/
|
|
55
36
|
getExpired(): boolean;
|
|
56
37
|
getCurrentCetusCycle(): {
|
|
57
38
|
dayTime: boolean;
|
|
58
|
-
timeLeft:
|
|
39
|
+
timeLeft: string;
|
|
59
40
|
expiry: Date;
|
|
60
|
-
expiresIn:
|
|
41
|
+
expiresIn: number;
|
|
61
42
|
state: string;
|
|
62
43
|
start: number;
|
|
63
44
|
};
|
|
45
|
+
#private;
|
|
64
46
|
}
|
|
65
|
-
import WorldstateObject
|
|
47
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
export = ChallengeInstance;
|
|
2
1
|
/**
|
|
3
2
|
* Describes a world challenge instance
|
|
4
3
|
*/
|
|
5
|
-
|
|
4
|
+
export default class ChallengeInstance {
|
|
6
5
|
/**
|
|
7
|
-
* @param {
|
|
6
|
+
* @param {object} data The challenge instance data
|
|
8
7
|
* @param {Dependency} deps The dependencies object
|
|
9
|
-
* @param {Translator} deps.translator The string translator
|
|
10
8
|
* @param {string} deps.locale Locale to use for translations
|
|
11
9
|
*/
|
|
12
|
-
constructor(data:
|
|
10
|
+
constructor(data: object, { locale }?: Dependency);
|
|
13
11
|
/**
|
|
14
12
|
* Type of challenge
|
|
15
13
|
* @type {string}
|
|
@@ -17,22 +15,22 @@ declare class ChallengeInstance {
|
|
|
17
15
|
type: string;
|
|
18
16
|
/**
|
|
19
17
|
* Minimum enemy level to fulfill challenge
|
|
20
|
-
* @type {
|
|
18
|
+
* @type {number}
|
|
21
19
|
*/
|
|
22
20
|
minEnemyLevel: number;
|
|
23
21
|
/**
|
|
24
22
|
* Required number of units to complete challenge
|
|
25
|
-
* @type {
|
|
23
|
+
* @type {number}
|
|
26
24
|
*/
|
|
27
25
|
requiredAmount: number;
|
|
28
26
|
/**
|
|
29
27
|
* Waypoint for amount of units between progression updates
|
|
30
|
-
* @type {
|
|
28
|
+
* @type {number}
|
|
31
29
|
*/
|
|
32
30
|
progressAmount: number;
|
|
33
31
|
/**
|
|
34
32
|
* Required damage type
|
|
35
|
-
* @type {
|
|
33
|
+
* @type {string | undefined}
|
|
36
34
|
*/
|
|
37
35
|
damageType: string | undefined;
|
|
38
36
|
/**
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
export = ConclaveChallenge;
|
|
2
1
|
/**
|
|
3
2
|
* Represents a Conclave challenge
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class ConclaveChallenge extends WorldstateObject {
|
|
7
6
|
/**
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
11
|
-
* @param {Translator} deps.translator The string translator
|
|
12
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
7
|
+
* @param {object} data The challenge data
|
|
8
|
+
* @param {object} deps The dependencies object
|
|
13
9
|
* @param {string} deps.locale Locale to use for translations
|
|
14
10
|
*/
|
|
15
|
-
constructor(data:
|
|
16
|
-
mdConfig: MarkdownSettings;
|
|
17
|
-
translator: Translator;
|
|
18
|
-
timeDate: TimeDateFunctions;
|
|
11
|
+
constructor(data: object, { locale }?: {
|
|
19
12
|
locale: string;
|
|
20
13
|
});
|
|
21
|
-
/**
|
|
22
|
-
* The markdown settings
|
|
23
|
-
* @type {MarkdownSettings}
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
private mdConfig;
|
|
27
14
|
/**
|
|
28
15
|
* The number of times that the challenge's objective needs to be completed
|
|
29
16
|
* @type {number}
|
|
@@ -41,7 +28,7 @@ declare class ConclaveChallenge extends WorldstateObject {
|
|
|
41
28
|
category: string;
|
|
42
29
|
/**
|
|
43
30
|
* ETA string (at time of object creation)
|
|
44
|
-
* @type {
|
|
31
|
+
* @type {string}
|
|
45
32
|
*/
|
|
46
33
|
eta: string;
|
|
47
34
|
/**
|
|
@@ -76,7 +63,7 @@ declare class ConclaveChallenge extends WorldstateObject {
|
|
|
76
63
|
title: string;
|
|
77
64
|
/**
|
|
78
65
|
* Standing granted by completing challenge.
|
|
79
|
-
* @type {
|
|
66
|
+
* @type {number}
|
|
80
67
|
*/
|
|
81
68
|
standing: number;
|
|
82
69
|
/**
|
|
@@ -86,18 +73,18 @@ declare class ConclaveChallenge extends WorldstateObject {
|
|
|
86
73
|
asString: string;
|
|
87
74
|
/**
|
|
88
75
|
* Get whether or not the challenge is daily
|
|
89
|
-
* @returns {boolean}
|
|
76
|
+
* @returns {boolean} whether the category is daily
|
|
90
77
|
*/
|
|
91
78
|
isDaily(): boolean;
|
|
92
79
|
/**
|
|
93
80
|
* Get whether or not this is the weekly root challenge
|
|
94
|
-
* @returns {boolean}
|
|
81
|
+
* @returns {boolean} whether this is the root challenge
|
|
95
82
|
*/
|
|
96
83
|
isRootChallenge(): boolean;
|
|
97
84
|
/**
|
|
98
85
|
* Get whether or not the challenge has expired
|
|
99
|
-
* @returns {boolean}
|
|
86
|
+
* @returns {boolean} Whether or not the challenge has expired
|
|
100
87
|
*/
|
|
101
88
|
isExpired(): boolean;
|
|
102
89
|
}
|
|
103
|
-
import WorldstateObject
|
|
90
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
export = ConstructionProgress;
|
|
2
1
|
/**
|
|
3
2
|
* Represents enemy construction progress
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class ConstructionProgress extends WorldstateObject {
|
|
7
6
|
/**
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {Object} deps The dependencies object
|
|
10
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
7
|
+
* @param {object} data The construction data
|
|
11
8
|
*/
|
|
12
|
-
constructor(data:
|
|
13
|
-
mdConfig: MarkdownSettings;
|
|
14
|
-
});
|
|
15
|
-
/**
|
|
16
|
-
* The markdown settings
|
|
17
|
-
* @type {MarkdownSettings}
|
|
18
|
-
* @private
|
|
19
|
-
*/
|
|
20
|
-
private mdConfig;
|
|
9
|
+
constructor(data: object);
|
|
21
10
|
fomorianProgress: any;
|
|
22
11
|
razorbackProgress: any;
|
|
23
12
|
unknownProgress: any;
|
|
24
13
|
}
|
|
25
|
-
import WorldstateObject
|
|
14
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,34 +1,15 @@
|
|
|
1
|
-
export = DailyDeal;
|
|
2
1
|
/**
|
|
3
2
|
* Represents a daily deal
|
|
4
3
|
*/
|
|
5
|
-
|
|
4
|
+
export default class DailyDeal {
|
|
6
5
|
/**
|
|
7
|
-
* @param {
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
10
|
-
* @param {Translator} deps.translator The string translator
|
|
11
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
6
|
+
* @param {object} data The deal data
|
|
7
|
+
* @param {object} deps The dependencies object
|
|
12
8
|
* @param {string} deps.locale Locale to use for translations
|
|
13
9
|
*/
|
|
14
|
-
constructor(data:
|
|
15
|
-
mdConfig: MarkdownSettings;
|
|
16
|
-
translator: Translator;
|
|
17
|
-
timeDate: TimeDateFunctions;
|
|
10
|
+
constructor(data: object, { locale }?: {
|
|
18
11
|
locale: string;
|
|
19
12
|
});
|
|
20
|
-
/**
|
|
21
|
-
* The markdown settings
|
|
22
|
-
* @type {MarkdownSettings}
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
private mdConfig;
|
|
26
|
-
/**
|
|
27
|
-
* The time and date functions
|
|
28
|
-
* @type {TimeDateFunctions}
|
|
29
|
-
* @private
|
|
30
|
-
*/
|
|
31
|
-
private timeDate;
|
|
32
13
|
/**
|
|
33
14
|
* The item that is being offered in the sale
|
|
34
15
|
* @type {string}
|
|
@@ -76,7 +57,7 @@ declare class DailyDeal {
|
|
|
76
57
|
id: string;
|
|
77
58
|
/**
|
|
78
59
|
* ETA string (at time of object creation)
|
|
79
|
-
* @type {
|
|
60
|
+
* @type {string}
|
|
80
61
|
*/
|
|
81
62
|
eta: string;
|
|
82
63
|
/**
|
|
@@ -86,12 +67,12 @@ declare class DailyDeal {
|
|
|
86
67
|
discount: number;
|
|
87
68
|
/**
|
|
88
69
|
* Get a string indicating how much time is left before the deal expires
|
|
89
|
-
* @returns {string}
|
|
70
|
+
* @returns {string} estimated time remaining on the deal
|
|
90
71
|
*/
|
|
91
72
|
getETAString(): string;
|
|
92
73
|
/**
|
|
93
74
|
* Returns a string representation of the daily deal
|
|
94
|
-
* @returns {string}
|
|
75
|
+
* @returns {string} The string representation of the daily deal
|
|
95
76
|
*/
|
|
96
77
|
toString(): string;
|
|
97
78
|
}
|
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
export = DarkSector;
|
|
2
1
|
/**
|
|
3
2
|
* Represents a dark sector
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
11
|
-
* @param {Translator} deps.translator The string translator
|
|
12
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
13
|
-
* @param {Mission} deps.Mission The mission parser
|
|
14
|
-
* @param {DarkSectorBattle} deps.DarkSectorBattle The dark sector battle parser
|
|
15
|
-
* @param {Reward} deps.Reward The reward parser
|
|
5
|
+
export default class DarkSector extends WorldstateObject {
|
|
6
|
+
/**
|
|
7
|
+
* @param {object} data The dark sector data
|
|
8
|
+
* @param {object} deps The dependencies object
|
|
16
9
|
* @param {string} deps.locale Locale to use for translations
|
|
17
10
|
*/
|
|
18
|
-
constructor(data:
|
|
19
|
-
mdConfig: MarkdownSettings;
|
|
20
|
-
translator: Translator;
|
|
21
|
-
timeDate: TimeDateFunctions;
|
|
22
|
-
Mission: Mission;
|
|
23
|
-
DarkSectorBattle: DarkSectorBattle;
|
|
24
|
-
Reward: Reward;
|
|
11
|
+
constructor(data: object, { locale }?: {
|
|
25
12
|
locale: string;
|
|
26
13
|
});
|
|
27
14
|
/**
|
|
@@ -46,7 +33,7 @@ declare class DarkSector extends WorldstateObject {
|
|
|
46
33
|
memberItemsTaxRate: number;
|
|
47
34
|
/**
|
|
48
35
|
* Whether the dark sector holder is an alliance or not
|
|
49
|
-
* @type {
|
|
36
|
+
* @type {boolean}
|
|
50
37
|
*/
|
|
51
38
|
isAlliance: boolean;
|
|
52
39
|
/**
|
|
@@ -96,7 +83,7 @@ declare class DarkSector extends WorldstateObject {
|
|
|
96
83
|
* The dark sector's mission
|
|
97
84
|
* @type {?Mission}
|
|
98
85
|
*/
|
|
99
|
-
mission: Mission;
|
|
86
|
+
mission: Mission | null;
|
|
100
87
|
battlePayReserve: any;
|
|
101
88
|
/**
|
|
102
89
|
* The battle pay per mission offered to players
|
|
@@ -129,4 +116,6 @@ declare class DarkSector extends WorldstateObject {
|
|
|
129
116
|
*/
|
|
130
117
|
history: Array<DarkSectorBattle>;
|
|
131
118
|
}
|
|
132
|
-
import WorldstateObject
|
|
119
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
120
|
+
import Mission from './Mission.js';
|
|
121
|
+
import DarkSectorBattle from './DarkSectorBattle.js';
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
export = DarkSectorBattle;
|
|
2
1
|
/**
|
|
3
2
|
* Represents a battle over a dark sector
|
|
4
3
|
*/
|
|
5
|
-
|
|
4
|
+
export default class DarkSectorBattle {
|
|
6
5
|
/**
|
|
7
|
-
* @param {
|
|
6
|
+
* @param {object} data The battle data
|
|
8
7
|
*/
|
|
9
|
-
constructor(data:
|
|
10
|
-
timeDate: any;
|
|
11
|
-
});
|
|
8
|
+
constructor(data: object);
|
|
12
9
|
/**
|
|
13
10
|
* The defenders of the dark sector
|
|
14
11
|
* @type {string}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
export = DuviriCycle;
|
|
2
1
|
/**
|
|
3
2
|
* @typedef {WorldstateObject} DuviriCycle
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
7
|
-
constructor({
|
|
8
|
-
timeDate: any;
|
|
9
|
-
translator: any;
|
|
5
|
+
export default class DuviriCycle extends WorldstateObject {
|
|
6
|
+
constructor({ duviriChoices }: {
|
|
10
7
|
duviriChoices: any;
|
|
11
8
|
});
|
|
12
9
|
/**
|
|
@@ -20,8 +17,5 @@ declare class DuviriCycle extends WorldstateObject {
|
|
|
20
17
|
choices: any;
|
|
21
18
|
id: string;
|
|
22
19
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
import WorldstateObject = require("./WorldstateObject");
|
|
27
|
-
type DuviriCycle = WorldstateObject;
|
|
20
|
+
export type DuviriCycle = WorldstateObject;
|
|
21
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
export = EarthCycle;
|
|
2
1
|
/**
|
|
3
2
|
* Represents the current Earth Day/Night Cycle
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* @param {Object} data The event data
|
|
9
|
-
* @param {Object} deps The dependencies object
|
|
10
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
11
|
-
*/
|
|
12
|
-
constructor({ mdConfig, timeDate }: any);
|
|
13
|
-
/**
|
|
14
|
-
* The markdown settings
|
|
15
|
-
* @type {MarkdownSettings}
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
private mdConfig;
|
|
5
|
+
export default class EarthCycle extends WorldstateObject {
|
|
6
|
+
constructor();
|
|
19
7
|
/**
|
|
20
8
|
* Whether or not this it's daytime
|
|
21
9
|
* @type {boolean}
|
|
@@ -34,8 +22,43 @@ declare class EarthCycle extends WorldstateObject {
|
|
|
34
22
|
id: string;
|
|
35
23
|
/**
|
|
36
24
|
* Get whether or not the event has expired
|
|
37
|
-
* @returns {boolean}
|
|
25
|
+
* @returns {boolean} Whether or not the event has expired
|
|
38
26
|
*/
|
|
39
27
|
getExpired(): boolean;
|
|
28
|
+
#private;
|
|
40
29
|
}
|
|
41
|
-
|
|
30
|
+
export type EarthCycle = {
|
|
31
|
+
/**
|
|
32
|
+
* The date and time at which the event ends
|
|
33
|
+
*/
|
|
34
|
+
expiry: Date;
|
|
35
|
+
/**
|
|
36
|
+
* The date and time at which the event started
|
|
37
|
+
*/
|
|
38
|
+
activation: Date;
|
|
39
|
+
/**
|
|
40
|
+
* Whether or not this it's daytime
|
|
41
|
+
*/
|
|
42
|
+
isDay: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Current cycle state. One of `day`, `night`
|
|
45
|
+
*/
|
|
46
|
+
state: string;
|
|
47
|
+
/**
|
|
48
|
+
* Time remaining string
|
|
49
|
+
*/
|
|
50
|
+
timeLeft: string;
|
|
51
|
+
/**
|
|
52
|
+
* The date and time at which the event ends, rounded to the nearest minute
|
|
53
|
+
*/
|
|
54
|
+
rounded: Date;
|
|
55
|
+
/**
|
|
56
|
+
* The date and time at which the event started, 4 hours before the end
|
|
57
|
+
*/
|
|
58
|
+
start: Date;
|
|
59
|
+
/**
|
|
60
|
+
* Whether or not the event has expired
|
|
61
|
+
*/
|
|
62
|
+
expired: boolean;
|
|
63
|
+
};
|
|
64
|
+
import WorldstateObject from './WorldstateObject.js';
|