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,21 +1,14 @@
|
|
|
1
|
-
export = Fissure;
|
|
2
1
|
/**
|
|
3
2
|
* Represents a fissure mission
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class Fissure extends WorldstateObject {
|
|
7
6
|
/**
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {Translator} deps.translator The string translator
|
|
11
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
7
|
+
* @param {object} data The fissure data
|
|
8
|
+
* @param {Dependency} deps The dependencies object
|
|
12
9
|
* @param {string} deps.locale Locale to use for translations
|
|
13
10
|
*/
|
|
14
|
-
constructor(data:
|
|
15
|
-
translator: Translator;
|
|
16
|
-
timeDate: TimeDateFunctions;
|
|
17
|
-
locale: string;
|
|
18
|
-
});
|
|
11
|
+
constructor(data: object, { locale }?: Dependency);
|
|
19
12
|
/**
|
|
20
13
|
* The node where the fissure has appeared
|
|
21
14
|
* @type {string}
|
|
@@ -63,12 +56,12 @@ declare class Fissure extends WorldstateObject {
|
|
|
63
56
|
expired: boolean;
|
|
64
57
|
/**
|
|
65
58
|
* ETA string (at time of object creation)
|
|
66
|
-
* @type {
|
|
59
|
+
* @type {string}
|
|
67
60
|
*/
|
|
68
61
|
eta: string;
|
|
69
62
|
/**
|
|
70
63
|
* Whether this fissure corresponds to a RailJack Void Storm
|
|
71
|
-
* @type {
|
|
64
|
+
* @type {boolean}
|
|
72
65
|
*/
|
|
73
66
|
isStorm: boolean;
|
|
74
67
|
/**
|
|
@@ -78,13 +71,13 @@ declare class Fissure extends WorldstateObject {
|
|
|
78
71
|
isHard: boolean;
|
|
79
72
|
/**
|
|
80
73
|
* Get whether this deal has expired
|
|
81
|
-
* @returns {boolean}
|
|
74
|
+
* @returns {boolean} Whether or not the deal has expired
|
|
82
75
|
*/
|
|
83
76
|
getExpired(): boolean;
|
|
84
77
|
/**
|
|
85
78
|
* Get a string representation of how long the void fissure will remain active
|
|
86
|
-
* @returns {string}
|
|
79
|
+
* @returns {string} The string representation of the fissure's remaining time
|
|
87
80
|
*/
|
|
88
81
|
getETAString(): string;
|
|
89
82
|
}
|
|
90
|
-
import WorldstateObject
|
|
83
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,34 +1,13 @@
|
|
|
1
|
-
export = FlashSale;
|
|
2
1
|
/**
|
|
3
2
|
* Represents a flash sale
|
|
4
3
|
*/
|
|
5
|
-
|
|
4
|
+
export default class FlashSale {
|
|
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 flash sale data
|
|
7
|
+
* @param {Dependency} 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;
|
|
18
|
-
locale: string;
|
|
19
|
-
});
|
|
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;
|
|
10
|
+
constructor(data: object, { locale }?: Dependency);
|
|
32
11
|
/**
|
|
33
12
|
* The item being offered in the flash sale
|
|
34
13
|
* @type {string}
|
|
@@ -86,22 +65,22 @@ declare class FlashSale {
|
|
|
86
65
|
expired: boolean;
|
|
87
66
|
/**
|
|
88
67
|
* ETA string (at time of object creation)
|
|
89
|
-
* @type {
|
|
68
|
+
* @type {string}
|
|
90
69
|
*/
|
|
91
70
|
eta: string;
|
|
92
71
|
/**
|
|
93
72
|
* Get how much time is left before the deal expires
|
|
94
|
-
* @returns {string}
|
|
73
|
+
* @returns {string} The time left before the deal expires
|
|
95
74
|
*/
|
|
96
75
|
getETAString(): string;
|
|
97
76
|
/**
|
|
98
77
|
* Get whether or not this deal has expired
|
|
99
|
-
* @returns {boolean}
|
|
78
|
+
* @returns {boolean} Whether or not the deal has expired
|
|
100
79
|
*/
|
|
101
80
|
getExpired(): boolean;
|
|
102
81
|
/**
|
|
103
82
|
* Returns a string representation of the flash sale
|
|
104
|
-
* @returns {string}
|
|
83
|
+
* @returns {string} The string representation of the flash sale
|
|
105
84
|
*/
|
|
106
85
|
toString(): string;
|
|
107
86
|
}
|
|
@@ -1,34 +1,15 @@
|
|
|
1
|
-
export = GlobalUpgrade;
|
|
2
1
|
/**
|
|
3
2
|
* Represents an upgrade that applies to all players
|
|
4
3
|
*/
|
|
5
|
-
|
|
4
|
+
export default class GlobalUpgrade {
|
|
6
5
|
/**
|
|
7
|
-
* @param {
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {Translator} deps.translator The string translator
|
|
10
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
11
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
6
|
+
* @param {object} data The global upgrade 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
|
-
translator: Translator;
|
|
16
|
-
timeDate: TimeDateFunctions;
|
|
17
|
-
mdConfig: MarkdownSettings;
|
|
10
|
+
constructor(data: object, { locale }?: {
|
|
18
11
|
locale: string;
|
|
19
12
|
});
|
|
20
|
-
/**
|
|
21
|
-
* The time and date functions
|
|
22
|
-
* @type {TimeDateFunctions}
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
private timeDate;
|
|
26
|
-
/**
|
|
27
|
-
* The markdown settings
|
|
28
|
-
* @type {MarkdownSettings}
|
|
29
|
-
* @private
|
|
30
|
-
*/
|
|
31
|
-
private mdConfig;
|
|
32
13
|
/**
|
|
33
14
|
* The time and date at which the global upgrade starts being active
|
|
34
15
|
* @type {Date}
|
|
@@ -66,7 +47,7 @@ declare class GlobalUpgrade {
|
|
|
66
47
|
expired: boolean;
|
|
67
48
|
/**
|
|
68
49
|
* ETA string (at time of object creation)
|
|
69
|
-
* @type {
|
|
50
|
+
* @type {string}
|
|
70
51
|
*/
|
|
71
52
|
eta: string;
|
|
72
53
|
/**
|
|
@@ -76,12 +57,12 @@ declare class GlobalUpgrade {
|
|
|
76
57
|
desc: string;
|
|
77
58
|
/**
|
|
78
59
|
* Get whether or not the event has expired
|
|
79
|
-
* @returns {boolean}
|
|
60
|
+
* @returns {boolean} whether the event has expired
|
|
80
61
|
*/
|
|
81
62
|
getExpired(): boolean;
|
|
82
63
|
/**
|
|
83
64
|
* Get a string indicating how long it will take for the upgrade to expire
|
|
84
|
-
* @returns {string}
|
|
65
|
+
* @returns {string} estimated timer of the upgrade
|
|
85
66
|
*/
|
|
86
67
|
getETAString(): string;
|
|
87
68
|
/**
|
|
@@ -91,7 +72,7 @@ declare class GlobalUpgrade {
|
|
|
91
72
|
compileDesription(): string;
|
|
92
73
|
/**
|
|
93
74
|
* Returns a string representation of the upgrade
|
|
94
|
-
* @returns {string}
|
|
75
|
+
* @returns {string} string representation
|
|
95
76
|
*/
|
|
96
77
|
toString(): string;
|
|
97
78
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export = Invasion;
|
|
2
1
|
/**
|
|
3
2
|
* An invasion participant
|
|
4
|
-
* @typedef {
|
|
3
|
+
* @typedef {object} InvasionParticipant
|
|
5
4
|
* @property {string} reward Reward for supporting this participant in the invasion
|
|
6
5
|
* @property {string} faction Faction of this participant (localized)
|
|
7
6
|
* @property {string} factionKey Faction of this participant (always English)
|
|
@@ -9,29 +8,13 @@ export = Invasion;
|
|
|
9
8
|
/**
|
|
10
9
|
* Represents an invasion
|
|
11
10
|
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @param {Object} data The invasion data
|
|
15
|
-
* @param {Object} deps The dependencies object
|
|
16
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
17
|
-
* @param {Translator} deps.translator The string translator
|
|
18
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
19
|
-
* @param {Reward} deps.Reward The Reward parser
|
|
20
|
-
* @param {string} deps.locale Locale to use for translations
|
|
21
|
-
*/
|
|
22
|
-
constructor(data: any, { mdConfig, translator, timeDate, Reward, locale }: {
|
|
23
|
-
mdConfig: MarkdownSettings;
|
|
24
|
-
translator: Translator;
|
|
25
|
-
timeDate: TimeDateFunctions;
|
|
26
|
-
Reward: Reward;
|
|
27
|
-
locale: string;
|
|
28
|
-
});
|
|
11
|
+
export default class Invasion extends WorldstateObject {
|
|
29
12
|
/**
|
|
30
|
-
* The
|
|
31
|
-
* @
|
|
32
|
-
* @
|
|
13
|
+
* @param {object} data The invasion data
|
|
14
|
+
* @param {Dependency} deps The dependencies object
|
|
15
|
+
* @param {string} deps.locale Locale to use for translations
|
|
33
16
|
*/
|
|
34
|
-
|
|
17
|
+
constructor(data: object, { locale }?: Dependency);
|
|
35
18
|
/**
|
|
36
19
|
* The node where the invasion is taking place
|
|
37
20
|
* @type {string}
|
|
@@ -47,11 +30,6 @@ declare class Invasion extends WorldstateObject {
|
|
|
47
30
|
* @type {string}
|
|
48
31
|
*/
|
|
49
32
|
desc: string;
|
|
50
|
-
/**
|
|
51
|
-
* The attacker's reward
|
|
52
|
-
* @type {Reward}
|
|
53
|
-
*/
|
|
54
|
-
attackerReward: Reward;
|
|
55
33
|
/**
|
|
56
34
|
* The attacking faction
|
|
57
35
|
* @type {string}
|
|
@@ -59,24 +37,14 @@ declare class Invasion extends WorldstateObject {
|
|
|
59
37
|
attackingFaction: string;
|
|
60
38
|
/**
|
|
61
39
|
* Invasion attacker
|
|
62
|
-
* @type {
|
|
63
|
-
*/
|
|
64
|
-
attacker: Invasion;
|
|
65
|
-
/**
|
|
66
|
-
* The defender's reward
|
|
67
|
-
* @type {Reward}
|
|
40
|
+
* @type {InvasionParticipant}
|
|
68
41
|
*/
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* The defending faction
|
|
72
|
-
* @type {string}
|
|
73
|
-
*/
|
|
74
|
-
defendingFaction: string;
|
|
42
|
+
attacker: InvasionParticipant;
|
|
75
43
|
/**
|
|
76
44
|
* Invasion defender
|
|
77
|
-
* @type {
|
|
45
|
+
* @type {InvasionParticipant}
|
|
78
46
|
*/
|
|
79
|
-
defender:
|
|
47
|
+
defender: InvasionParticipant;
|
|
80
48
|
/**
|
|
81
49
|
* Whether this invasion is against the infestation
|
|
82
50
|
* @type {boolean}
|
|
@@ -106,7 +74,7 @@ declare class Invasion extends WorldstateObject {
|
|
|
106
74
|
completed: boolean;
|
|
107
75
|
/**
|
|
108
76
|
* ETA string (at time of object creation)
|
|
109
|
-
* @type {
|
|
77
|
+
* @type {string}
|
|
110
78
|
*/
|
|
111
79
|
eta: string;
|
|
112
80
|
/**
|
|
@@ -117,33 +85,29 @@ declare class Invasion extends WorldstateObject {
|
|
|
117
85
|
/**
|
|
118
86
|
* Whether or not the attackers are winning.
|
|
119
87
|
* This is always false when the infestation is attacking
|
|
120
|
-
* @returns {boolean}
|
|
88
|
+
* @returns {boolean} whether the attacker is winning
|
|
121
89
|
*/
|
|
122
90
|
isAttackerWinning(): boolean;
|
|
123
91
|
/**
|
|
124
92
|
* Get an estimation of how much time is left before the invasion ends in milliseconds
|
|
125
|
-
* @returns {number}
|
|
93
|
+
* @returns {number} remaining time in ms
|
|
126
94
|
*/
|
|
127
95
|
getRemainingTime(): number;
|
|
128
96
|
/**
|
|
129
97
|
* Get a string estimating how much time is left before the invasion ends
|
|
130
|
-
* @returns {string}
|
|
98
|
+
* @returns {string} time delta string from now to the end
|
|
131
99
|
*/
|
|
132
100
|
getETAString(): string;
|
|
133
101
|
/**
|
|
134
102
|
* Get the types of the items being rewarded in the invasion
|
|
135
|
-
* @returns {Array
|
|
103
|
+
* @returns {Array<string>} types of items being rewarded
|
|
136
104
|
*/
|
|
137
105
|
getRewardTypes(): Array<string>;
|
|
138
106
|
}
|
|
139
|
-
declare namespace Invasion {
|
|
140
|
-
export { Invasion };
|
|
141
|
-
}
|
|
142
|
-
import WorldstateObject = require("./WorldstateObject");
|
|
143
107
|
/**
|
|
144
|
-
*
|
|
108
|
+
* An invasion participant
|
|
145
109
|
*/
|
|
146
|
-
type
|
|
110
|
+
export type InvasionParticipant = {
|
|
147
111
|
/**
|
|
148
112
|
* Reward for supporting this participant in the invasion
|
|
149
113
|
*/
|
|
@@ -157,3 +121,4 @@ type Invasion = {
|
|
|
157
121
|
*/
|
|
158
122
|
factionKey: string;
|
|
159
123
|
};
|
|
124
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Stores and parses kuva data from https://10o.io/kuvalog.json
|
|
3
|
+
* @property {ExternalMission[]} kuva currently active kuva missions
|
|
4
|
+
* @property {ExternalMission} arbitration current arbitration
|
|
5
|
+
*/
|
|
6
|
+
export default class Kuva {
|
|
7
|
+
constructor({ kuvaData, locale, logger }: {
|
|
4
8
|
kuvaData: any;
|
|
5
|
-
translator: any;
|
|
6
9
|
locale: any;
|
|
7
10
|
logger: any;
|
|
8
11
|
});
|
|
9
|
-
|
|
10
|
-
* The translation functions
|
|
11
|
-
* @type {Translator}
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
private translator;
|
|
15
|
-
/**
|
|
16
|
-
* The locale to leverage for translations
|
|
17
|
-
* @type {string}
|
|
18
|
-
* @private
|
|
19
|
-
*/
|
|
20
|
-
private locale;
|
|
21
|
-
}
|
|
22
|
-
declare namespace Kuva {
|
|
23
|
-
export { ExternalMission, Kuva };
|
|
12
|
+
#private;
|
|
24
13
|
}
|
|
25
14
|
/**
|
|
26
15
|
* External mission data retrieved from https://10o.io/kuvalog.json
|
|
27
16
|
*/
|
|
28
|
-
type ExternalMission = {
|
|
17
|
+
export type ExternalMission = {
|
|
29
18
|
/**
|
|
30
19
|
* start time
|
|
31
20
|
*/
|
|
@@ -59,7 +48,7 @@ type ExternalMission = {
|
|
|
59
48
|
/**
|
|
60
49
|
* Stores and parses kuva data from https://10o.io/kuvalog.json
|
|
61
50
|
*/
|
|
62
|
-
type Kuva = {
|
|
51
|
+
export type Kuva = {
|
|
63
52
|
/**
|
|
64
53
|
* currently active kuva missions
|
|
65
54
|
*/
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Represents an in-game mission
|
|
3
|
+
*/
|
|
4
|
+
export default class Mission {
|
|
3
5
|
/**
|
|
4
|
-
* @param {
|
|
5
|
-
* @param {
|
|
6
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
7
|
-
* @param {Translator} deps.translator The string translator
|
|
8
|
-
* @param {Reward} deps.Reward The Reward parser
|
|
9
|
-
* @param {string} deps.locale Locale to use for translations
|
|
6
|
+
* @param {object} data The mission data
|
|
7
|
+
* @param {string} locale Locale to use for translations
|
|
10
8
|
*/
|
|
11
|
-
constructor(data:
|
|
12
|
-
mdConfig: MarkdownSettings;
|
|
13
|
-
translator: Translator;
|
|
14
|
-
Reward: Reward;
|
|
15
|
-
locale: string;
|
|
16
|
-
});
|
|
17
|
-
/**
|
|
18
|
-
* The markdown settings
|
|
19
|
-
* @type {MarkdownSettings}
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
private mdConfig;
|
|
9
|
+
constructor(data: object, { locale }?: string);
|
|
23
10
|
/**
|
|
24
11
|
* The mission's description
|
|
25
12
|
* @type {?string}
|
|
@@ -59,7 +46,7 @@ declare class Mission {
|
|
|
59
46
|
* The mission's reward
|
|
60
47
|
* @type {?Reward}
|
|
61
48
|
*/
|
|
62
|
-
reward: Reward;
|
|
49
|
+
reward: Reward | null;
|
|
63
50
|
/**
|
|
64
51
|
* The minimum level of the enemies in the mission
|
|
65
52
|
* @type {number}
|
|
@@ -97,7 +84,7 @@ declare class Mission {
|
|
|
97
84
|
levelOverride: string;
|
|
98
85
|
/**
|
|
99
86
|
* Enemy specification for the mission
|
|
100
|
-
* @type {
|
|
87
|
+
* @type {string}
|
|
101
88
|
*/
|
|
102
89
|
enemySpec: string;
|
|
103
90
|
/**
|
|
@@ -142,7 +129,8 @@ declare class Mission {
|
|
|
142
129
|
exclusiveWeapon: string;
|
|
143
130
|
/**
|
|
144
131
|
* The Mission's string representation
|
|
145
|
-
* @returns {string}
|
|
132
|
+
* @returns {string} Mission's string representation
|
|
146
133
|
*/
|
|
147
134
|
toString(): string;
|
|
148
135
|
}
|
|
136
|
+
import Reward from './Reward.js';
|
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
export = News;
|
|
2
1
|
/**
|
|
3
2
|
* Represents a game news item
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class News 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
|
|
13
|
-
* @param {locale} deps.locale Locale to use for determining language
|
|
7
|
+
* @param {object} data The news data
|
|
8
|
+
* @param {string} locale Locale to use for determining language
|
|
14
9
|
*/
|
|
15
|
-
constructor(data:
|
|
16
|
-
/**
|
|
17
|
-
* The markdown settings
|
|
18
|
-
* @type {MarkdownSettings}
|
|
19
|
-
* @private
|
|
20
|
-
*/
|
|
21
|
-
private mdConfig;
|
|
10
|
+
constructor(data: object, { locale }?: string);
|
|
22
11
|
/**
|
|
23
12
|
* The news message
|
|
24
13
|
* @type {string}
|
|
@@ -56,16 +45,16 @@ declare class News extends WorldstateObject {
|
|
|
56
45
|
endDate: Date | null;
|
|
57
46
|
/**
|
|
58
47
|
* ETA string (at time of object creation)
|
|
59
|
-
* @type {
|
|
48
|
+
* @type {string}
|
|
60
49
|
*/
|
|
61
50
|
eta: string;
|
|
62
51
|
/**
|
|
63
|
-
*
|
|
52
|
+
* Whether this is an update news item
|
|
64
53
|
* @type {boolean}
|
|
65
54
|
*/
|
|
66
55
|
update: boolean;
|
|
67
56
|
/**
|
|
68
|
-
*
|
|
57
|
+
* Whether this is a prime access news item
|
|
69
58
|
* @type {boolean}
|
|
70
59
|
*/
|
|
71
60
|
primeAccess: boolean;
|
|
@@ -76,11 +65,9 @@ declare class News extends WorldstateObject {
|
|
|
76
65
|
stream: boolean;
|
|
77
66
|
/**
|
|
78
67
|
* Translation of the news item
|
|
79
|
-
* @type {
|
|
68
|
+
* @type {Record<string, string>}
|
|
80
69
|
*/
|
|
81
|
-
translations:
|
|
82
|
-
[x: string]: string;
|
|
83
|
-
};
|
|
70
|
+
translations: Record<string, string>;
|
|
84
71
|
/**
|
|
85
72
|
* The string representation of this object at creation
|
|
86
73
|
* @type {string}
|
|
@@ -89,29 +76,29 @@ declare class News extends WorldstateObject {
|
|
|
89
76
|
/**
|
|
90
77
|
* Get a string indicating how long it will take for the event to start or
|
|
91
78
|
* how long it's been since the news went up
|
|
92
|
-
* @returns {string}
|
|
79
|
+
* @returns {string} the estimated time of arrival for the event
|
|
93
80
|
*/
|
|
94
81
|
getETAString(): string;
|
|
95
82
|
/**
|
|
96
83
|
* Whether or not this is about a game update
|
|
97
|
-
* @returns {boolean}
|
|
84
|
+
* @returns {boolean} whether the news is about an update
|
|
98
85
|
*/
|
|
99
86
|
isUpdate(): boolean;
|
|
100
87
|
/**
|
|
101
|
-
* Whether
|
|
102
|
-
* @returns {boolean}
|
|
88
|
+
* Whether this is about a new Prime Access
|
|
89
|
+
* @returns {boolean} whether the news is about a new Prime Access
|
|
103
90
|
*/
|
|
104
91
|
isPrimeAccess(): boolean;
|
|
105
92
|
/**
|
|
106
|
-
* Whether
|
|
107
|
-
* @returns {boolean}
|
|
93
|
+
* Whether this is about a new stream
|
|
94
|
+
* @returns {boolean} whether the news is for a stream
|
|
108
95
|
*/
|
|
109
96
|
isStream(): boolean;
|
|
110
97
|
/**
|
|
111
98
|
* The title of the news item in the specified language
|
|
112
99
|
* @param {string} langCode Ex. 'es', 'de', 'fr'
|
|
113
|
-
* @returns {string}
|
|
100
|
+
* @returns {string} The title of the news item in the specified language
|
|
114
101
|
*/
|
|
115
102
|
getTitle(langCode: string): string;
|
|
116
103
|
}
|
|
117
|
-
import WorldstateObject
|
|
104
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,37 +1,20 @@
|
|
|
1
|
-
export = Nightwave;
|
|
2
1
|
/**
|
|
3
2
|
* Represents an alert
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class Nightwave 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
|
|
13
|
-
* @param {Mission} deps.Mission The Mission parser
|
|
14
|
-
* @param {Reward} deps.Reward The Reward parser
|
|
7
|
+
* @param {object} data The alert data
|
|
8
|
+
* @param {object} deps The dependencies object
|
|
15
9
|
* @param {string} deps.locale Locale to use for translations
|
|
16
10
|
*/
|
|
17
|
-
constructor(data:
|
|
18
|
-
mdConfig: MarkdownSettings;
|
|
19
|
-
translator: Translator;
|
|
20
|
-
timeDate: TimeDateFunctions;
|
|
21
|
-
Mission: Mission;
|
|
22
|
-
Reward: Reward;
|
|
11
|
+
constructor(data: object, { locale }?: {
|
|
23
12
|
locale: string;
|
|
24
13
|
});
|
|
25
14
|
id: string;
|
|
26
|
-
/**
|
|
27
|
-
* The markdown settings
|
|
28
|
-
* @type {MarkdownSettings}
|
|
29
|
-
* @private
|
|
30
|
-
*/
|
|
31
|
-
private mdConfig;
|
|
32
15
|
/**
|
|
33
16
|
* The current season. 0-indexed.
|
|
34
|
-
* @type {
|
|
17
|
+
* @type {number}
|
|
35
18
|
*/
|
|
36
19
|
season: number;
|
|
37
20
|
/**
|
|
@@ -41,14 +24,14 @@ declare class Nightwave extends WorldstateObject {
|
|
|
41
24
|
tag: string;
|
|
42
25
|
/**
|
|
43
26
|
* The current season's current phase. 0-indexed.
|
|
44
|
-
* @type {
|
|
27
|
+
* @type {number}
|
|
45
28
|
*/
|
|
46
29
|
phase: number;
|
|
47
30
|
/**
|
|
48
31
|
* Misc params provided.
|
|
49
|
-
* @type {
|
|
32
|
+
* @type {object}
|
|
50
33
|
*/
|
|
51
|
-
params:
|
|
34
|
+
params: object;
|
|
52
35
|
possibleChallenges: any;
|
|
53
36
|
activeChallenges: any;
|
|
54
37
|
/**
|
|
@@ -58,13 +41,13 @@ declare class Nightwave extends WorldstateObject {
|
|
|
58
41
|
rewardTypes: Array<string>;
|
|
59
42
|
/**
|
|
60
43
|
* Get a string indicating how much time is left before the alert expires
|
|
61
|
-
* @returns {string}
|
|
44
|
+
* @returns {string} estimated timer of the alert
|
|
62
45
|
*/
|
|
63
46
|
getETAString(): string;
|
|
64
47
|
/**
|
|
65
48
|
* Get an array containing the types of all of the nightwave season's rewards
|
|
66
|
-
* @returns {Array.<string>}
|
|
49
|
+
* @returns {Array.<string>} an array containing the types of all of the nightwave season's rewards
|
|
67
50
|
*/
|
|
68
51
|
getRewardTypes(): Array<string>;
|
|
69
52
|
}
|
|
70
|
-
import WorldstateObject
|
|
53
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
export = NightwaveChallenge;
|
|
2
1
|
/**
|
|
3
2
|
* Represents an alert
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class NightwaveChallenge extends WorldstateObject {
|
|
7
6
|
/**
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {Translator} deps.translator The string translator
|
|
11
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
7
|
+
* @param {object} data The alert data
|
|
8
|
+
* @param {object} deps The dependencies object
|
|
12
9
|
* @param {string} deps.locale Locale to use for translations
|
|
13
10
|
*/
|
|
14
|
-
constructor(data:
|
|
15
|
-
translator: Translator;
|
|
16
|
-
timeDate: TimeDateFunctions;
|
|
11
|
+
constructor(data: object, { locale }?: {
|
|
17
12
|
locale: string;
|
|
18
13
|
});
|
|
19
14
|
/**
|
|
20
15
|
* Whether or not this is a daily challenge
|
|
21
|
-
* @type {
|
|
16
|
+
* @type {boolean}
|
|
22
17
|
*/
|
|
23
18
|
isDaily: boolean;
|
|
24
19
|
/**
|
|
25
20
|
* Whether or not the challenge is an elite challenge
|
|
26
|
-
* @type {
|
|
21
|
+
* @type {boolean}
|
|
27
22
|
*/
|
|
28
23
|
isElite: boolean;
|
|
29
24
|
/**
|
|
@@ -38,13 +33,13 @@ declare class NightwaveChallenge extends WorldstateObject {
|
|
|
38
33
|
title: string;
|
|
39
34
|
/**
|
|
40
35
|
* Reputation reward for ranking up in the Nightwave
|
|
41
|
-
* @type {
|
|
36
|
+
* @type {number}
|
|
42
37
|
*/
|
|
43
38
|
reputation: number;
|
|
44
39
|
/**
|
|
45
40
|
* Whether this challenge is permanent
|
|
46
|
-
* @type {
|
|
41
|
+
* @type {boolean}
|
|
47
42
|
*/
|
|
48
43
|
isPermanent: boolean;
|
|
49
44
|
}
|
|
50
|
-
import WorldstateObject
|
|
45
|
+
import WorldstateObject from './WorldstateObject.js';
|