warframe-worldstate-parser 2.24.1 → 2.25.0
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/lib/Fissure.js +15 -7
- package/lib/Mission.js +2 -2
- package/lib/SentientOutpost.js +1 -0
- package/lib/Sortie.js +11 -9
- package/lib/SortieVariant.js +7 -8
- package/lib/SteelPathOffering.js +1 -0
- package/lib/SyndicateJob.js +1 -0
- package/lib/WorldState.js +15 -4
- package/lib/WorldstateObject.js +32 -9
- package/lib/ZarimanCycle.js +2 -2
- package/lib/timeDate.js +11 -10
- package/lib/translation.js +25 -26
- package/package.json +1 -1
- package/types/lib/CambionCycle.d.ts +9 -0
- package/types/lib/CetusCycle.d.ts +1 -0
- package/types/lib/EarthCycle.d.ts +1 -0
- package/types/lib/Fissure.d.ts +8 -7
- package/types/lib/Nightwave.d.ts +1 -0
- package/types/lib/NightwaveChallenge.d.ts +6 -0
- package/types/lib/Sortie.d.ts +10 -16
- package/types/lib/SortieVariant.d.ts +5 -11
- package/types/lib/SyndicateMission.d.ts +5 -0
- package/types/lib/VallisCycle.d.ts +1 -0
- package/types/lib/WorldState.d.ts +0 -1
- package/types/lib/WorldstateObject.d.ts +43 -11
- package/types/lib/ZarimanCycle.d.ts +2 -1
- package/types/main.d.ts +1 -1
package/lib/Fissure.js
CHANGED
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
const WorldstateObject = require('./WorldstateObject');
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {Object} ContentFissure
|
|
7
|
+
* @property
|
|
8
|
+
*/
|
|
5
9
|
/**
|
|
6
10
|
* Represents a fissure mission
|
|
7
11
|
* @extends {WorldstateObject}
|
|
8
12
|
*/
|
|
9
|
-
class Fissure extends WorldstateObject {
|
|
13
|
+
module.exports = class Fissure extends WorldstateObject {
|
|
10
14
|
/**
|
|
11
15
|
* @param {Object} data The fissure data
|
|
12
16
|
* @param {Object} deps The dependencies object
|
|
@@ -90,7 +94,7 @@ class Fissure extends WorldstateObject {
|
|
|
90
94
|
this.expiry = timeDate.parseDate(data.Expiry);
|
|
91
95
|
|
|
92
96
|
/**
|
|
93
|
-
* Whether
|
|
97
|
+
* Whether this is expired (at time of object creation)
|
|
94
98
|
* @type {boolean}
|
|
95
99
|
*/
|
|
96
100
|
this.expired = this.getExpired();
|
|
@@ -102,14 +106,20 @@ class Fissure extends WorldstateObject {
|
|
|
102
106
|
this.eta = this.getETAString();
|
|
103
107
|
|
|
104
108
|
/**
|
|
105
|
-
* Whether
|
|
109
|
+
* Whether this fissure corresponds to a RailJack Void Storm
|
|
106
110
|
* @type {Boolean}
|
|
107
111
|
*/
|
|
108
112
|
this.isStorm = !!data.ActiveMissionTier;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Whether this fissure is a Steel Path fissure
|
|
116
|
+
* @type {boolean}
|
|
117
|
+
*/
|
|
118
|
+
this.isHard = !!data.Hard;
|
|
109
119
|
}
|
|
110
120
|
|
|
111
121
|
/**
|
|
112
|
-
* Get whether
|
|
122
|
+
* Get whether this deal has expired
|
|
113
123
|
* @returns {boolean}
|
|
114
124
|
*/
|
|
115
125
|
getExpired() {
|
|
@@ -131,6 +141,4 @@ class Fissure extends WorldstateObject {
|
|
|
131
141
|
toString() {
|
|
132
142
|
return `[${this.getETAString()}] ${this.tier} fissure at ${this.node} - ${this.enemy} ${this.missionType}`;
|
|
133
143
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
module.exports = Fissure;
|
|
144
|
+
};
|
package/lib/Mission.js
CHANGED
|
@@ -38,13 +38,13 @@ module.exports = class Mission {
|
|
|
38
38
|
* The node where the mission takes place
|
|
39
39
|
* @type {string}
|
|
40
40
|
*/
|
|
41
|
-
this.node = translator.node(data.location, locale);
|
|
41
|
+
this.node = translator.node(data.location || data.node, locale);
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Unlocalized {@link mission#node}
|
|
45
45
|
* @type {string}
|
|
46
46
|
*/
|
|
47
|
-
this.nodeKey = translator.node(data.location, 'en');
|
|
47
|
+
this.nodeKey = translator.node(data.location || data.node, 'en');
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* The mission's type
|
package/lib/SentientOutpost.js
CHANGED
package/lib/Sortie.js
CHANGED
|
@@ -10,14 +10,14 @@ class Sortie extends WorldstateObject {
|
|
|
10
10
|
/**
|
|
11
11
|
* @param {Object} data The data for all daily sorties
|
|
12
12
|
* @param {Object} deps The dependencies object
|
|
13
|
-
* @param {MarkdownSettings}
|
|
14
|
-
* @param {Translator}
|
|
15
|
-
* @param {TimeDateFunctions}
|
|
16
|
-
* @param {Object}
|
|
17
|
-
* @param {SortieVariant}
|
|
18
|
-
* @param {string}
|
|
13
|
+
* @param {MarkdownSettings} mdConfig The markdown settings
|
|
14
|
+
* @param {Translator} translator The string translator
|
|
15
|
+
* @param {TimeDateFunctions} timeDate The time and date functions
|
|
16
|
+
* @param {Object} sortieData The data used to parse sorties
|
|
17
|
+
* @param {SortieVariant} SortieVariant The sortie variant parser
|
|
18
|
+
* @param {string} locale Locale to use for translations
|
|
19
19
|
*/
|
|
20
|
-
constructor(data, { mdConfig, translator, timeDate, sortieData, SortieVariant, locale }) {
|
|
20
|
+
constructor(data, { mdConfig, translator, timeDate, sortieData, SortieVariant, locale, Mission }) {
|
|
21
21
|
super(data, { timeDate });
|
|
22
22
|
|
|
23
23
|
const opts = {
|
|
@@ -67,7 +67,9 @@ class Sortie extends WorldstateObject {
|
|
|
67
67
|
* The sortie's variants
|
|
68
68
|
* @type {Array.<SortieVariant>}
|
|
69
69
|
*/
|
|
70
|
-
this.variants = data.Variants.map((v) => new SortieVariant(v, opts));
|
|
70
|
+
this.variants = (data.Variants || []).map((v) => new SortieVariant(v, opts));
|
|
71
|
+
|
|
72
|
+
this.missions = (data.Missions || []).map((v) => new Mission(v, opts));
|
|
71
73
|
|
|
72
74
|
/**
|
|
73
75
|
* The sortie's boss
|
|
@@ -88,7 +90,7 @@ class Sortie extends WorldstateObject {
|
|
|
88
90
|
this.factionKey = translator.sortieFaction(data.boss, 'en');
|
|
89
91
|
|
|
90
92
|
/**
|
|
91
|
-
* Whether
|
|
93
|
+
* Whether this is expired (at time of object creation)
|
|
92
94
|
* @type {boolean}
|
|
93
95
|
*/
|
|
94
96
|
this.expired = this.isExpired();
|
package/lib/SortieVariant.js
CHANGED
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
class SortieVariant {
|
|
7
7
|
/**
|
|
8
8
|
* @param {Object} data Sortie variant data
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {
|
|
11
|
-
* @param {
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {string} deps.locale Locale to use for translations
|
|
9
|
+
* @param {MarkdownSettings} mdConfig The markdown settings
|
|
10
|
+
* @param {Translator} translator The string translator
|
|
11
|
+
* @param {Object} sortieData The data used to parse sorties
|
|
12
|
+
* @param {string} locale Locale to use for translations
|
|
14
13
|
*/
|
|
15
14
|
constructor(data, { mdConfig, translator, locale }) {
|
|
16
15
|
/**
|
|
@@ -51,9 +50,9 @@ class SortieVariant {
|
|
|
51
50
|
* @returns {string}
|
|
52
51
|
*/
|
|
53
52
|
toString() {
|
|
54
|
-
return
|
|
55
|
-
this.mdConfig.lineEnd
|
|
56
|
-
|
|
53
|
+
return this.modifier
|
|
54
|
+
? `${this.node.padEnd(25, ' ')} | ${this.modifier.padEnd(20, ' ')} | ${this.missionType}${this.mdConfig.lineEnd}`
|
|
55
|
+
: `${this.node.padEnd(25, ' ')} | ${this.missionType}${this.mdConfig.lineEnd}`;
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
|
package/lib/SteelPathOffering.js
CHANGED
|
@@ -4,6 +4,7 @@ const monday = 1;
|
|
|
4
4
|
|
|
5
5
|
function getFirstDayOfWeek() {
|
|
6
6
|
const resultDate = new Date();
|
|
7
|
+
/* istanbul ignore next */
|
|
7
8
|
const offset = resultDate.getUTCDay() === 0 ? 6 : resultDate.getUTCDay() - monday;
|
|
8
9
|
resultDate.setUTCDate(resultDate.getUTCDate() - offset);
|
|
9
10
|
resultDate.setUTCHours(0);
|
package/lib/SyndicateJob.js
CHANGED
package/lib/WorldState.js
CHANGED
|
@@ -35,12 +35,8 @@ const SentientOutpost = require('./SentientOutpost');
|
|
|
35
35
|
const CambionCycle = require('./CambionCycle');
|
|
36
36
|
const SteelPathOffering = require('./SteelPathOffering');
|
|
37
37
|
|
|
38
|
-
/* eslint-disable no-unused-vars */
|
|
39
38
|
// needed for type declarations
|
|
40
|
-
const Dependency = require('./supporting/Dependency');
|
|
41
|
-
const ExternalMission = require('./supporting/ExternalMission');
|
|
42
39
|
const MarkdownSettings = require('./supporting/MarkdownSettings');
|
|
43
|
-
/* eslint-enable no-unused-vars */
|
|
44
40
|
|
|
45
41
|
const safeArray = (arr) => arr || [];
|
|
46
42
|
const safeObj = (obj) => obj || {};
|
|
@@ -78,6 +74,14 @@ const defaultDeps = {
|
|
|
78
74
|
logger: console,
|
|
79
75
|
};
|
|
80
76
|
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @param {Object} ParserClass class for parsing data
|
|
80
|
+
* @param {Array<BaseContentObject>} dataArray array of raw data
|
|
81
|
+
* @param {Dependency} deps shared dependency object
|
|
82
|
+
* @param {*} uniqueField field to treat as unique
|
|
83
|
+
* @returns {WorldstateObject}
|
|
84
|
+
*/
|
|
81
85
|
function parseArray(ParserClass, dataArray, deps, uniqueField) {
|
|
82
86
|
const arr = (dataArray || []).map((d) => new ParserClass(d, deps));
|
|
83
87
|
if (uniqueField) {
|
|
@@ -90,6 +94,7 @@ function parseArray(ParserClass, dataArray, deps, uniqueField) {
|
|
|
90
94
|
if (Object.prototype.hasOwnProperty.call(obj, 'active')) {
|
|
91
95
|
return obj.active;
|
|
92
96
|
}
|
|
97
|
+
/* istanbul ignore next */
|
|
93
98
|
return true;
|
|
94
99
|
});
|
|
95
100
|
}
|
|
@@ -314,5 +319,11 @@ module.exports = class WorldState {
|
|
|
314
319
|
this.steelPath = new SteelPathOffering(deps);
|
|
315
320
|
|
|
316
321
|
[this.vaultTrader] = parseArray(deps.VoidTrader, data.PrimeVaultTraders, deps);
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* The current archon hunt
|
|
325
|
+
* @type {Sortie}
|
|
326
|
+
*/
|
|
327
|
+
[this.archonHunt] = parseArray(deps.Sortie, data.LiteSorties, deps);
|
|
317
328
|
}
|
|
318
329
|
};
|
package/lib/WorldstateObject.js
CHANGED
|
@@ -1,16 +1,41 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* @typedef {Object} Identifier
|
|
5
|
+
* @property {string} $id older identifier schema
|
|
6
|
+
* @property {string} $oid newer global identifier schema
|
|
5
7
|
*/
|
|
6
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} LegacyTimestamp
|
|
10
|
+
* @property {number} sec second-based timestamp
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @typedef {Object} Timestamp
|
|
14
|
+
* @property {number} $numberLong millisecond-based timestamp
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {Object} ContentTimestamp
|
|
18
|
+
* @property {LegacyTimestamp|Timestamp} $date timestamp number wrapper
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {Object} BaseContentObject
|
|
22
|
+
* @property {Identifier} _id
|
|
23
|
+
* @property {ContentTimestamp} Activation
|
|
24
|
+
* @property {ContentTimestamp} Expiry
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Represents a generic object from Worldstate
|
|
29
|
+
*/
|
|
30
|
+
module.exports = class WorldstateObject {
|
|
7
31
|
/**
|
|
8
|
-
* @param {
|
|
32
|
+
* @param {BaseContentObject} data The object data
|
|
33
|
+
* @param {TimeDateFunctions} timeDate time date functions
|
|
9
34
|
*/
|
|
10
35
|
constructor(data, { timeDate }) {
|
|
11
36
|
/**
|
|
12
37
|
* The object's id field
|
|
13
|
-
* @type {
|
|
38
|
+
* @type {Identifier.$id|Identifier.$oid}
|
|
14
39
|
*/
|
|
15
40
|
// eslint-disable-next-line no-underscore-dangle
|
|
16
41
|
this.id = data._id ? data._id.$oid || data._id.$id : undefined;
|
|
@@ -48,7 +73,7 @@ class WorldstateObject {
|
|
|
48
73
|
|
|
49
74
|
if (data.Activation && data.Expiry) {
|
|
50
75
|
/**
|
|
51
|
-
* Whether
|
|
76
|
+
* Whether the void trader is active (at time of object creation)
|
|
52
77
|
* @type {boolean}
|
|
53
78
|
*/
|
|
54
79
|
this.active = this.isActive();
|
|
@@ -64,7 +89,7 @@ class WorldstateObject {
|
|
|
64
89
|
}
|
|
65
90
|
|
|
66
91
|
/**
|
|
67
|
-
* Get whether
|
|
92
|
+
* Get whether the trader is currently active
|
|
68
93
|
* @returns {boolean}
|
|
69
94
|
*/
|
|
70
95
|
isActive() {
|
|
@@ -86,6 +111,4 @@ class WorldstateObject {
|
|
|
86
111
|
getEndString() {
|
|
87
112
|
return this.timeDate.timeDeltaToString(this.timeDate.fromNow(this.expiry));
|
|
88
113
|
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
module.exports = WorldstateObject;
|
|
114
|
+
};
|
package/lib/ZarimanCycle.js
CHANGED
|
@@ -91,11 +91,11 @@ module.exports = class ZarimanCycle extends WorldstateObject {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* Get whether
|
|
94
|
+
* Get whether the event has expired
|
|
95
95
|
* @returns {boolean}
|
|
96
96
|
*/
|
|
97
97
|
getExpired() {
|
|
98
|
-
return this.expiry ? this.timeDate.fromNow(this.expiry) < 0 : true;
|
|
98
|
+
return this.expiry ? this.timeDate.fromNow(this.expiry) < 0 : /* istanbul ignore next */ true;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
getCurrentZarimanCycle() {
|
package/lib/timeDate.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* An object containing functions to format dates and times
|
|
5
|
-
* @typedef {Object.<function>} TimeDateFunctions
|
|
6
|
-
* @property {function} timeDeltaToString - Converts a time difference to a string
|
|
7
|
-
* @property {function} fromNow - Returns the number of milliseconds between now and
|
|
8
|
-
* a given date
|
|
9
|
-
* @property {function} toNow - Returns the number of milliseconds between a given
|
|
10
|
-
* date and now
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
3
|
const epochZero = {
|
|
14
4
|
$date: {
|
|
15
5
|
$numberLong: 0,
|
|
@@ -42,6 +32,8 @@ function timeDeltaToString(millis) {
|
|
|
42
32
|
timePieces.push(`${Math.floor(seconds / 60)}m`);
|
|
43
33
|
seconds = Math.floor(seconds) % 60;
|
|
44
34
|
}
|
|
35
|
+
|
|
36
|
+
/* istanbul ignore else */
|
|
45
37
|
if (seconds >= 0) {
|
|
46
38
|
timePieces.push(`${Math.floor(seconds)}s`);
|
|
47
39
|
}
|
|
@@ -79,6 +71,15 @@ function parseDate(d) {
|
|
|
79
71
|
return new Date(safeD.$date ? Number(dt.$numberLong) : 1000 * d.sec);
|
|
80
72
|
}
|
|
81
73
|
|
|
74
|
+
/**
|
|
75
|
+
* An object containing functions to format dates and times
|
|
76
|
+
* @typedef {Object.<function>} TimeDateFunctions
|
|
77
|
+
* @property {function} timeDeltaToString - Converts a time difference to a string
|
|
78
|
+
* @property {function} fromNow - Returns the number of milliseconds between now and
|
|
79
|
+
* a given date
|
|
80
|
+
* @property {function} toNow - Returns the number of milliseconds between a given
|
|
81
|
+
* date and now
|
|
82
|
+
*/
|
|
82
83
|
module.exports = {
|
|
83
84
|
timeDeltaToString,
|
|
84
85
|
fromNow,
|
package/lib/translation.js
CHANGED
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* An object containing functions to convert in-game names to their localizations
|
|
5
|
-
* @typedef {Object.<function>} Translator
|
|
6
|
-
* @property {function} faction - Converts faction names
|
|
7
|
-
* @property {function} node - Converts star map node names
|
|
8
|
-
* @property {function} nodeMissionType - Returns the mission type of a given node
|
|
9
|
-
* @property {function} nodeEnemy - Returns the faction that controls a given node
|
|
10
|
-
* @property {function} languageString - Converts generic language strings
|
|
11
|
-
* @property {function} languageDesc - Converts generic language strings
|
|
12
|
-
* and retrieves the description
|
|
13
|
-
* @property {function} missionType - Converts mission types
|
|
14
|
-
* @property {function} conclaveMode - Converts conclave modes
|
|
15
|
-
* @property {function} conclaveCategory - Converts conclave challenge categories
|
|
16
|
-
* @property {function} fissureModifier - Converts fissure mission modifiers
|
|
17
|
-
* @property {function} syndicate - Converts syndicate names
|
|
18
|
-
* @property {function} upgrade - Converts upgrade types
|
|
19
|
-
* @property {function} operation - Converts operation types
|
|
20
|
-
* @property {function} sortieBoss - Converts sortie boss names
|
|
21
|
-
* @property {function} sortieModifer - Converts sortie modifier types
|
|
22
|
-
* @property {function} sortieModDesc - Converts sortie modifier type descriptions
|
|
23
|
-
* @property {function} region - Converts persistent enemy region indicies
|
|
24
|
-
* @property {function} conclaveChallenge - Convert conclave identifiers into standing data
|
|
25
|
-
* @property {function} steelPath - Retrieve Steel Path rotation data for locale
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
3
|
const data = require('warframe-worldstate-data');
|
|
29
4
|
|
|
30
5
|
function toTitleCase(str) {
|
|
@@ -218,9 +193,33 @@ function conclaveChallenge(key, dataOverride) {
|
|
|
218
193
|
}
|
|
219
194
|
|
|
220
195
|
function steelPath(dataOverride) {
|
|
221
|
-
return (i18n(dataOverride) || data).steelPath;
|
|
196
|
+
return (i18n(dataOverride) || /* istanbul ignore next */ data).steelPath;
|
|
222
197
|
}
|
|
223
198
|
|
|
199
|
+
/**
|
|
200
|
+
* An object containing functions to convert in-game names to their localizations
|
|
201
|
+
* @typedef {Object.<function>} Translator
|
|
202
|
+
* @property {function} faction - Converts faction names
|
|
203
|
+
* @property {function} node - Converts star map node names
|
|
204
|
+
* @property {function} nodeMissionType - Returns the mission type of a given node
|
|
205
|
+
* @property {function} nodeEnemy - Returns the faction that controls a given node
|
|
206
|
+
* @property {function} languageString - Converts generic language strings
|
|
207
|
+
* @property {function} languageDesc - Converts generic language strings
|
|
208
|
+
* and retrieves the description
|
|
209
|
+
* @property {function} missionType - Converts mission types
|
|
210
|
+
* @property {function} conclaveMode - Converts conclave modes
|
|
211
|
+
* @property {function} conclaveCategory - Converts conclave challenge categories
|
|
212
|
+
* @property {function} fissureModifier - Converts fissure mission modifiers
|
|
213
|
+
* @property {function} syndicate - Converts syndicate names
|
|
214
|
+
* @property {function} upgrade - Converts upgrade types
|
|
215
|
+
* @property {function} operation - Converts operation types
|
|
216
|
+
* @property {function} sortieBoss - Converts sortie boss names
|
|
217
|
+
* @property {function} sortieModifier - Converts sortie modifier types
|
|
218
|
+
* @property {function} sortieModDesc - Converts sortie modifier type descriptions
|
|
219
|
+
* @property {function} region - Converts persistent enemy region indicies
|
|
220
|
+
* @property {function} conclaveChallenge - Convert conclave identifiers into standing data
|
|
221
|
+
* @property {function} steelPath - Retrieve Steel Path rotation data for locale
|
|
222
|
+
*/
|
|
224
223
|
module.exports = {
|
|
225
224
|
faction,
|
|
226
225
|
node,
|
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
export = CambionCycle;
|
|
2
2
|
declare class CambionCycle extends WorldstateObject {
|
|
3
|
+
/**
|
|
4
|
+
* @param {CetusCycle} cetusCycle Match data from cetus cycle for data
|
|
5
|
+
* @param {Object} deps The dependencies object
|
|
6
|
+
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
7
|
+
*/
|
|
8
|
+
constructor(cetusCycle: CetusCycle, { timeDate }: {
|
|
9
|
+
timeDate: TimeDateFunctions;
|
|
10
|
+
});
|
|
3
11
|
active: string;
|
|
12
|
+
id: string;
|
|
4
13
|
/**
|
|
5
14
|
* Get whether or not the event has expired
|
|
6
15
|
* @returns {boolean}
|
package/types/lib/Fissure.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
export = Fissure;
|
|
2
|
-
/**
|
|
3
|
-
* Represents a fissure mission
|
|
4
|
-
* @extends {WorldstateObject}
|
|
5
|
-
*/
|
|
6
2
|
declare class Fissure extends WorldstateObject {
|
|
7
3
|
/**
|
|
8
4
|
* @param {Object} data The fissure data
|
|
@@ -57,7 +53,7 @@ declare class Fissure extends WorldstateObject {
|
|
|
57
53
|
*/
|
|
58
54
|
tierNum: number;
|
|
59
55
|
/**
|
|
60
|
-
* Whether
|
|
56
|
+
* Whether this is expired (at time of object creation)
|
|
61
57
|
* @type {boolean}
|
|
62
58
|
*/
|
|
63
59
|
expired: boolean;
|
|
@@ -67,12 +63,17 @@ declare class Fissure extends WorldstateObject {
|
|
|
67
63
|
*/
|
|
68
64
|
eta: string;
|
|
69
65
|
/**
|
|
70
|
-
* Whether
|
|
66
|
+
* Whether this fissure corresponds to a RailJack Void Storm
|
|
71
67
|
* @type {Boolean}
|
|
72
68
|
*/
|
|
73
69
|
isStorm: boolean;
|
|
74
70
|
/**
|
|
75
|
-
*
|
|
71
|
+
* Whether this fissure is a Steel Path fissure
|
|
72
|
+
* @type {boolean}
|
|
73
|
+
*/
|
|
74
|
+
isHard: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Get whether this deal has expired
|
|
76
77
|
* @returns {boolean}
|
|
77
78
|
*/
|
|
78
79
|
getExpired(): boolean;
|
package/types/lib/Nightwave.d.ts
CHANGED
|
@@ -36,6 +36,12 @@ declare class NightwaveChallenge extends WorldstateObject {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
*/
|
|
38
38
|
title: string;
|
|
39
|
+
/**
|
|
40
|
+
* Generated id from expiry, challenge string,
|
|
41
|
+
* and whether or not it has `[PH]` (designating placeholder text)
|
|
42
|
+
* @type {string}
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
39
45
|
/**
|
|
40
46
|
* Reputation reward for ranking up in the Nightwave
|
|
41
47
|
* @type {Number}
|
package/types/lib/Sortie.d.ts
CHANGED
|
@@ -7,21 +7,14 @@ declare class Sortie extends WorldstateObject {
|
|
|
7
7
|
/**
|
|
8
8
|
* @param {Object} data The data for all daily sorties
|
|
9
9
|
* @param {Object} deps The dependencies object
|
|
10
|
-
* @param {MarkdownSettings}
|
|
11
|
-
* @param {Translator}
|
|
12
|
-
* @param {TimeDateFunctions}
|
|
13
|
-
* @param {Object}
|
|
14
|
-
* @param {SortieVariant}
|
|
15
|
-
* @param {string}
|
|
10
|
+
* @param {MarkdownSettings} mdConfig The markdown settings
|
|
11
|
+
* @param {Translator} translator The string translator
|
|
12
|
+
* @param {TimeDateFunctions} timeDate The time and date functions
|
|
13
|
+
* @param {Object} sortieData The data used to parse sorties
|
|
14
|
+
* @param {SortieVariant} SortieVariant The sortie variant parser
|
|
15
|
+
* @param {string} locale Locale to use for translations
|
|
16
16
|
*/
|
|
17
|
-
constructor(data: any, { mdConfig, translator, timeDate, sortieData, SortieVariant, locale }:
|
|
18
|
-
mdConfig: MarkdownSettings;
|
|
19
|
-
translator: Translator;
|
|
20
|
-
timeDate: TimeDateFunctions;
|
|
21
|
-
sortieData: any;
|
|
22
|
-
SortieVariant: SortieVariant;
|
|
23
|
-
locale: string;
|
|
24
|
-
});
|
|
17
|
+
constructor(data: any, { mdConfig, translator, timeDate, sortieData, SortieVariant, locale, Mission }: any);
|
|
25
18
|
/**
|
|
26
19
|
* The markdown settings
|
|
27
20
|
* @type {MarkdownSettings}
|
|
@@ -37,7 +30,8 @@ declare class Sortie extends WorldstateObject {
|
|
|
37
30
|
* The sortie's variants
|
|
38
31
|
* @type {Array.<SortieVariant>}
|
|
39
32
|
*/
|
|
40
|
-
variants: Array<
|
|
33
|
+
variants: Array<any>;
|
|
34
|
+
missions: any;
|
|
41
35
|
/**
|
|
42
36
|
* The sortie's boss
|
|
43
37
|
* @type {string}
|
|
@@ -54,7 +48,7 @@ declare class Sortie extends WorldstateObject {
|
|
|
54
48
|
*/
|
|
55
49
|
factionKey: string;
|
|
56
50
|
/**
|
|
57
|
-
* Whether
|
|
51
|
+
* Whether this is expired (at time of object creation)
|
|
58
52
|
* @type {boolean}
|
|
59
53
|
*/
|
|
60
54
|
expired: boolean;
|
|
@@ -5,18 +5,12 @@ export = SortieVariant;
|
|
|
5
5
|
declare class SortieVariant {
|
|
6
6
|
/**
|
|
7
7
|
* @param {Object} data Sortie variant data
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {
|
|
11
|
-
* @param {
|
|
12
|
-
* @param {string} deps.locale Locale to use for translations
|
|
8
|
+
* @param {MarkdownSettings} mdConfig The markdown settings
|
|
9
|
+
* @param {Translator} translator The string translator
|
|
10
|
+
* @param {Object} sortieData The data used to parse sorties
|
|
11
|
+
* @param {string} locale Locale to use for translations
|
|
13
12
|
*/
|
|
14
|
-
constructor(data: any, { mdConfig, translator, locale }:
|
|
15
|
-
mdConfig: MarkdownSettings;
|
|
16
|
-
translator: Translator;
|
|
17
|
-
sortieData: any;
|
|
18
|
-
locale: string;
|
|
19
|
-
});
|
|
13
|
+
constructor(data: any, { mdConfig, translator, locale }: MarkdownSettings);
|
|
20
14
|
/**
|
|
21
15
|
* The markdown settings
|
|
22
16
|
* @type {MarkdownSettings}
|
|
@@ -50,6 +50,11 @@ declare class SyndicateMission extends WorldstateObject {
|
|
|
50
50
|
* @type {Array.<SyndicateJob>}
|
|
51
51
|
*/
|
|
52
52
|
jobs: Array<SyndicateJob>;
|
|
53
|
+
/**
|
|
54
|
+
* Unique identifier for this mission set built from the end time and syndicate
|
|
55
|
+
* @type {string}
|
|
56
|
+
*/
|
|
57
|
+
id: string;
|
|
53
58
|
/**
|
|
54
59
|
* ETA string (at time of object creation)
|
|
55
60
|
* @type {String}
|
|
@@ -147,4 +147,3 @@ import VallisCycle = require("./VallisCycle");
|
|
|
147
147
|
import Nightwave = require("./Nightwave");
|
|
148
148
|
import SentientOutpost = require("./SentientOutpost");
|
|
149
149
|
import SteelPathOffering = require("./SteelPathOffering");
|
|
150
|
-
import Dependency = require("./supporting/Dependency");
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
export = WorldstateObject;
|
|
2
|
-
/**
|
|
3
|
-
* Represents a generic ojbect from Worldstate
|
|
4
|
-
*/
|
|
5
2
|
declare class WorldstateObject {
|
|
6
3
|
/**
|
|
7
|
-
* @param {
|
|
4
|
+
* @param {BaseContentObject} data The object data
|
|
5
|
+
* @param {TimeDateFunctions} timeDate time date functions
|
|
8
6
|
*/
|
|
9
|
-
constructor(data:
|
|
10
|
-
timeDate: any;
|
|
11
|
-
});
|
|
7
|
+
constructor(data: BaseContentObject, { timeDate }: TimeDateFunctions);
|
|
12
8
|
/**
|
|
13
9
|
* The object's id field
|
|
14
|
-
* @type {
|
|
10
|
+
* @type {Identifier.$id|Identifier.$oid}
|
|
15
11
|
*/
|
|
16
|
-
id:
|
|
12
|
+
id: Identifier.$id | Identifier.$oid;
|
|
17
13
|
/**
|
|
18
14
|
* The time and date functions
|
|
19
15
|
* @type {TimeDateFunctions}
|
|
@@ -37,7 +33,7 @@ declare class WorldstateObject {
|
|
|
37
33
|
*/
|
|
38
34
|
expiry: Date;
|
|
39
35
|
/**
|
|
40
|
-
* Whether
|
|
36
|
+
* Whether the void trader is active (at time of object creation)
|
|
41
37
|
* @type {boolean}
|
|
42
38
|
*/
|
|
43
39
|
active: boolean;
|
|
@@ -47,7 +43,7 @@ declare class WorldstateObject {
|
|
|
47
43
|
*/
|
|
48
44
|
toString(): string;
|
|
49
45
|
/**
|
|
50
|
-
* Get whether
|
|
46
|
+
* Get whether the trader is currently active
|
|
51
47
|
* @returns {boolean}
|
|
52
48
|
*/
|
|
53
49
|
isActive(): boolean;
|
|
@@ -62,3 +58,39 @@ declare class WorldstateObject {
|
|
|
62
58
|
*/
|
|
63
59
|
getEndString(): string;
|
|
64
60
|
}
|
|
61
|
+
declare namespace WorldstateObject {
|
|
62
|
+
export { Identifier, LegacyTimestamp, Timestamp, ContentTimestamp, BaseContentObject };
|
|
63
|
+
}
|
|
64
|
+
type BaseContentObject = {
|
|
65
|
+
_id: Identifier;
|
|
66
|
+
Activation: ContentTimestamp;
|
|
67
|
+
Expiry: ContentTimestamp;
|
|
68
|
+
};
|
|
69
|
+
type Identifier = {
|
|
70
|
+
/**
|
|
71
|
+
* older identifier schema
|
|
72
|
+
*/
|
|
73
|
+
$id: string;
|
|
74
|
+
/**
|
|
75
|
+
* newer global identifier schema
|
|
76
|
+
*/
|
|
77
|
+
$oid: string;
|
|
78
|
+
};
|
|
79
|
+
type LegacyTimestamp = {
|
|
80
|
+
/**
|
|
81
|
+
* second-based timestamp
|
|
82
|
+
*/
|
|
83
|
+
sec: number;
|
|
84
|
+
};
|
|
85
|
+
type Timestamp = {
|
|
86
|
+
/**
|
|
87
|
+
* millisecond-based timestamp
|
|
88
|
+
*/
|
|
89
|
+
$numberLong: number;
|
|
90
|
+
};
|
|
91
|
+
type ContentTimestamp = {
|
|
92
|
+
/**
|
|
93
|
+
* timestamp number wrapper
|
|
94
|
+
*/
|
|
95
|
+
$date: LegacyTimestamp | Timestamp;
|
|
96
|
+
};
|
|
@@ -37,9 +37,10 @@ declare class ZarimanCycle extends WorldstateObject {
|
|
|
37
37
|
* @type {string}
|
|
38
38
|
*/
|
|
39
39
|
timeLeft: string;
|
|
40
|
+
id: string;
|
|
40
41
|
shortString: string;
|
|
41
42
|
/**
|
|
42
|
-
* Get whether
|
|
43
|
+
* Get whether the event has expired
|
|
43
44
|
* @returns {boolean}
|
|
44
45
|
*/
|
|
45
46
|
getExpired(): boolean;
|
package/types/main.d.ts
CHANGED