warframe-worldstate-parser 2.31.1 → 3.0.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/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 +19 -17
- 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 +3 -5
- 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 +14 -14
- 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 +50 -28
- 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,10 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
timeDate: any;
|
|
5
|
-
translator: any;
|
|
6
|
-
locale: any;
|
|
1
|
+
export default class VoidTraderSchedule {
|
|
2
|
+
constructor(data: any, { locale }?: {
|
|
3
|
+
locale?: string;
|
|
7
4
|
});
|
|
8
|
-
expiry:
|
|
9
|
-
item:
|
|
5
|
+
expiry: Date;
|
|
6
|
+
item: string;
|
|
10
7
|
}
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
export = WeeklyChallenge;
|
|
2
1
|
/**
|
|
3
2
|
* Represents a void trader
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class WeeklyChallenge extends WorldstateObject {
|
|
7
6
|
/**
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {Object} deps The dependencies object
|
|
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 Void trader data
|
|
13
8
|
*/
|
|
14
|
-
constructor(data:
|
|
15
|
-
mdConfig: MarkdownSettings;
|
|
16
|
-
translator: Translator;
|
|
17
|
-
timeDate: TimeDateFunctions;
|
|
18
|
-
});
|
|
9
|
+
constructor(data: object);
|
|
19
10
|
challenges: any;
|
|
20
11
|
}
|
|
21
|
-
import WorldstateObject
|
|
12
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,48 +1,30 @@
|
|
|
1
|
-
export = WorldEvent;
|
|
2
1
|
/**
|
|
3
2
|
* Interim step for an event reward system.
|
|
4
|
-
* @typedef {
|
|
5
|
-
*
|
|
6
|
-
* @property {Number} goal Goal amount
|
|
3
|
+
* @typedef {object} InterimStep
|
|
4
|
+
* @property {number} goal Goal amount
|
|
7
5
|
* @property {Reward} reward Reward for reaching the step
|
|
8
|
-
* @property {
|
|
9
|
-
* @property {
|
|
6
|
+
* @property {number} winnerCount Amount of players at this step
|
|
7
|
+
* @property {object} message Message received when reaching the interim step
|
|
10
8
|
*/
|
|
11
9
|
/**
|
|
12
10
|
* Progress for one of multiple stages
|
|
13
|
-
* @typedef {
|
|
14
|
-
*
|
|
15
|
-
* @property {
|
|
16
|
-
* @property {Number} progressAmt
|
|
11
|
+
* @typedef {object} ProgressStep
|
|
12
|
+
* @property {string} type Type of progress
|
|
13
|
+
* @property {number} progressAmt Amount of progress
|
|
17
14
|
*/
|
|
18
15
|
/**
|
|
19
16
|
* Represents an in-game special event
|
|
20
|
-
*
|
|
21
|
-
* @extends {WorldstateObject}
|
|
17
|
+
* @augments {WorldstateObject}
|
|
22
18
|
*/
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @param {
|
|
26
|
-
* @param {
|
|
27
|
-
* @param {MarkdownSettings} deps.mdConfig The markdown settings
|
|
28
|
-
* @param {Translator} deps.translator The string translator
|
|
29
|
-
* @param {TimeDateFunctions} deps.timeDate The time and date functions
|
|
30
|
-
* @param {Reward} deps.Reward The Reward parser
|
|
19
|
+
export default class WorldEvent extends WorldstateObject {
|
|
20
|
+
/**
|
|
21
|
+
* @param {object} data The event data
|
|
22
|
+
* @param {object} deps The dependencies object
|
|
31
23
|
* @param {string} deps.locale Locale to use for translations
|
|
32
24
|
*/
|
|
33
|
-
constructor(data:
|
|
34
|
-
mdConfig: MarkdownSettings;
|
|
35
|
-
translator: Translator;
|
|
36
|
-
timeDate: TimeDateFunctions;
|
|
37
|
-
Reward: Reward;
|
|
25
|
+
constructor(data: object, { locale }?: {
|
|
38
26
|
locale: string;
|
|
39
27
|
});
|
|
40
|
-
/**
|
|
41
|
-
* The markdown settings
|
|
42
|
-
* @type {MarkdownSettings}
|
|
43
|
-
* @private
|
|
44
|
-
*/
|
|
45
|
-
private mdConfig;
|
|
46
28
|
/**
|
|
47
29
|
* The event's main score goal
|
|
48
30
|
* @type {number}
|
|
@@ -110,15 +92,15 @@ declare class WorldEvent extends WorldstateObject {
|
|
|
110
92
|
expired: boolean;
|
|
111
93
|
/**
|
|
112
94
|
* Health remaining for the target
|
|
113
|
-
* @type {
|
|
95
|
+
* @type {number}
|
|
114
96
|
*/
|
|
115
97
|
health: number;
|
|
116
|
-
affiliatedWith:
|
|
98
|
+
affiliatedWith: string;
|
|
117
99
|
jobs: any;
|
|
118
100
|
previousJobs: any;
|
|
119
101
|
/**
|
|
120
102
|
* Previous job id
|
|
121
|
-
* @type {
|
|
103
|
+
* @type {string}
|
|
122
104
|
*/
|
|
123
105
|
previousId: string;
|
|
124
106
|
/**
|
|
@@ -133,7 +115,7 @@ declare class WorldEvent extends WorldstateObject {
|
|
|
133
115
|
progressSteps: ProgressStep[];
|
|
134
116
|
/**
|
|
135
117
|
* Total of all MultiProgress
|
|
136
|
-
* @type {
|
|
118
|
+
* @type {number}
|
|
137
119
|
*/
|
|
138
120
|
progressTotal: number;
|
|
139
121
|
/**
|
|
@@ -143,12 +125,12 @@ declare class WorldEvent extends WorldstateObject {
|
|
|
143
125
|
showTotalAtEndOfMission: boolean;
|
|
144
126
|
/**
|
|
145
127
|
* Whether or not the event is personal
|
|
146
|
-
* @type {
|
|
128
|
+
* @type {boolean}
|
|
147
129
|
*/
|
|
148
130
|
isPersonal: boolean;
|
|
149
131
|
/**
|
|
150
132
|
* Whether or not the event is community
|
|
151
|
-
* @type {
|
|
133
|
+
* @type {boolean}
|
|
152
134
|
*/
|
|
153
135
|
isCommunity: boolean;
|
|
154
136
|
/**
|
|
@@ -164,35 +146,31 @@ declare class WorldEvent extends WorldstateObject {
|
|
|
164
146
|
asString: string;
|
|
165
147
|
/**
|
|
166
148
|
* Metadata provided by DE
|
|
167
|
-
* @type {
|
|
149
|
+
* @type {object}
|
|
168
150
|
*/
|
|
169
|
-
metadata:
|
|
151
|
+
metadata: object;
|
|
170
152
|
/**
|
|
171
153
|
* Bonuses given for completion
|
|
172
|
-
* @type {Array.<
|
|
154
|
+
* @type {Array.<number>}
|
|
173
155
|
*/
|
|
174
156
|
completionBonuses: Array<number>;
|
|
175
157
|
scoreVar: any;
|
|
176
|
-
altExpiry:
|
|
177
|
-
altActivation:
|
|
158
|
+
altExpiry: Date;
|
|
159
|
+
altActivation: Date;
|
|
178
160
|
nextAlt: {
|
|
179
|
-
expiry:
|
|
180
|
-
activation:
|
|
161
|
+
expiry: Date;
|
|
162
|
+
activation: Date;
|
|
181
163
|
};
|
|
182
164
|
/**
|
|
183
165
|
* Get whether or not the event has expired
|
|
184
|
-
* @returns {boolean}
|
|
166
|
+
* @returns {boolean} whether the event has expired
|
|
185
167
|
*/
|
|
186
168
|
getExpired(): boolean;
|
|
187
169
|
}
|
|
188
|
-
declare namespace WorldEvent {
|
|
189
|
-
export { InterimStep, ProgressStep };
|
|
190
|
-
}
|
|
191
|
-
import WorldstateObject = require("./WorldstateObject");
|
|
192
170
|
/**
|
|
193
171
|
* Interim step for an event reward system.
|
|
194
172
|
*/
|
|
195
|
-
type InterimStep = {
|
|
173
|
+
export type InterimStep = {
|
|
196
174
|
/**
|
|
197
175
|
* Goal amount
|
|
198
176
|
*/
|
|
@@ -208,12 +186,20 @@ type InterimStep = {
|
|
|
208
186
|
/**
|
|
209
187
|
* Message received when reaching the interim step
|
|
210
188
|
*/
|
|
211
|
-
message:
|
|
189
|
+
message: object;
|
|
212
190
|
};
|
|
213
191
|
/**
|
|
214
192
|
* Progress for one of multiple stages
|
|
215
193
|
*/
|
|
216
|
-
type ProgressStep = {
|
|
194
|
+
export type ProgressStep = {
|
|
195
|
+
/**
|
|
196
|
+
* Type of progress
|
|
197
|
+
*/
|
|
217
198
|
type: string;
|
|
199
|
+
/**
|
|
200
|
+
* Amount of progress
|
|
201
|
+
*/
|
|
218
202
|
progressAmt: number;
|
|
219
203
|
};
|
|
204
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
205
|
+
import Reward from './Reward.js';
|
|
@@ -1,23 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {object} Identifier
|
|
3
|
+
* @property {string} $id older identifier schema
|
|
4
|
+
* @property {string} $oid newer global identifier schema
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {object} LegacyTimestamp
|
|
8
|
+
* @property {number} sec second-based timestamp
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {object} Timestamp
|
|
12
|
+
* @property {number} $numberLong millisecond-based timestamp
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {object} ContentTimestamp
|
|
16
|
+
* @property {LegacyTimestamp|Timestamp} $date timestamp number wrapper
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* @typedef {object} BaseContentObject
|
|
20
|
+
* @property {Identifier} _id object identifier
|
|
21
|
+
* @property {ContentTimestamp} Activation activation timestamp
|
|
22
|
+
* @property {ContentTimestamp} Expiry expiry timestamp
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Represents a generic object from Worldstate
|
|
26
|
+
*/
|
|
27
|
+
export default class WorldstateObject {
|
|
3
28
|
/**
|
|
4
29
|
* @param {BaseContentObject} data The object data
|
|
5
|
-
* @param {TimeDateFunctions} timeDate time date functions
|
|
6
|
-
* @param {Translator} translator translation functions
|
|
7
30
|
*/
|
|
8
|
-
constructor(data: BaseContentObject
|
|
31
|
+
constructor(data: BaseContentObject);
|
|
9
32
|
/**
|
|
10
33
|
* The object's id field
|
|
11
34
|
* @type {Identifier.$id|Identifier.$oid}
|
|
12
35
|
*/
|
|
13
36
|
id: Identifier.$id | Identifier.$oid;
|
|
14
|
-
/**
|
|
15
|
-
* The time and date functions
|
|
16
|
-
* @type {TimeDateFunctions}
|
|
17
|
-
* @private
|
|
18
|
-
*/
|
|
19
|
-
private timeDate;
|
|
20
|
-
translator: any;
|
|
21
37
|
/**
|
|
22
38
|
* The date and time at which the void trader arrives
|
|
23
39
|
* @type {Date}
|
|
@@ -41,34 +57,26 @@ declare class WorldstateObject {
|
|
|
41
57
|
active: boolean;
|
|
42
58
|
/**
|
|
43
59
|
* Returns a string representation of the object
|
|
44
|
-
* @returns {string}
|
|
60
|
+
* @returns {string} basic representation from the id
|
|
45
61
|
*/
|
|
46
62
|
toString(): string;
|
|
47
63
|
/**
|
|
48
64
|
* Get whether the trader is currently active
|
|
49
|
-
* @returns {boolean}
|
|
65
|
+
* @returns {boolean} whether the trader is active
|
|
50
66
|
*/
|
|
51
67
|
isActive(): boolean;
|
|
52
68
|
/**
|
|
53
69
|
* Get a string indicating how long it will take for the trader to arrive
|
|
54
|
-
* @returns {string}
|
|
70
|
+
* @returns {string} time delta string from now to the start
|
|
55
71
|
*/
|
|
56
72
|
getStartString(): string;
|
|
57
73
|
/**
|
|
58
74
|
* Get a string indicating how long it will take for the trader to leave
|
|
59
|
-
* @returns {string}
|
|
75
|
+
* @returns {string} time delta string from now to the end
|
|
60
76
|
*/
|
|
61
77
|
getEndString(): string;
|
|
62
78
|
}
|
|
63
|
-
|
|
64
|
-
export { Identifier, LegacyTimestamp, Timestamp, ContentTimestamp, BaseContentObject };
|
|
65
|
-
}
|
|
66
|
-
type BaseContentObject = {
|
|
67
|
-
_id: Identifier;
|
|
68
|
-
Activation: ContentTimestamp;
|
|
69
|
-
Expiry: ContentTimestamp;
|
|
70
|
-
};
|
|
71
|
-
type Identifier = {
|
|
79
|
+
export type Identifier = {
|
|
72
80
|
/**
|
|
73
81
|
* older identifier schema
|
|
74
82
|
*/
|
|
@@ -78,21 +86,35 @@ type Identifier = {
|
|
|
78
86
|
*/
|
|
79
87
|
$oid: string;
|
|
80
88
|
};
|
|
81
|
-
type LegacyTimestamp = {
|
|
89
|
+
export type LegacyTimestamp = {
|
|
82
90
|
/**
|
|
83
91
|
* second-based timestamp
|
|
84
92
|
*/
|
|
85
93
|
sec: number;
|
|
86
94
|
};
|
|
87
|
-
type Timestamp = {
|
|
95
|
+
export type Timestamp = {
|
|
88
96
|
/**
|
|
89
97
|
* millisecond-based timestamp
|
|
90
98
|
*/
|
|
91
99
|
$numberLong: number;
|
|
92
100
|
};
|
|
93
|
-
type ContentTimestamp = {
|
|
101
|
+
export type ContentTimestamp = {
|
|
94
102
|
/**
|
|
95
103
|
* timestamp number wrapper
|
|
96
104
|
*/
|
|
97
105
|
$date: LegacyTimestamp | Timestamp;
|
|
98
106
|
};
|
|
107
|
+
export type BaseContentObject = {
|
|
108
|
+
/**
|
|
109
|
+
* object identifier
|
|
110
|
+
*/
|
|
111
|
+
_id: Identifier;
|
|
112
|
+
/**
|
|
113
|
+
* activation timestamp
|
|
114
|
+
*/
|
|
115
|
+
Activation: ContentTimestamp;
|
|
116
|
+
/**
|
|
117
|
+
* expiry timestamp
|
|
118
|
+
*/
|
|
119
|
+
Expiry: ContentTimestamp;
|
|
120
|
+
};
|
|
@@ -1,31 +1,12 @@
|
|
|
1
|
-
export = ZarimanCycle;
|
|
2
1
|
/**
|
|
3
2
|
* Represents the current Zariman Corpus/Grineer Cycle
|
|
4
|
-
* @
|
|
3
|
+
* @augments {WorldstateObject}
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
export default class ZarimanCycle extends WorldstateObject {
|
|
7
6
|
/**
|
|
8
|
-
* @param
|
|
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
|
|
7
|
+
* @param {Date} bountiesEndDate The current Zariman cycle expiry
|
|
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 Zariman bounties timer, the faction changes exactly half way through
|
|
25
|
-
* @type {Date}
|
|
26
|
-
* @private
|
|
27
|
-
*/
|
|
28
|
-
private bountiesEndDate;
|
|
9
|
+
constructor(bountiesEndDate: Date);
|
|
29
10
|
/**
|
|
30
11
|
* Whether or not this it's corpus or grineer
|
|
31
12
|
* @type {boolean}
|
|
@@ -45,16 +26,17 @@ declare class ZarimanCycle extends WorldstateObject {
|
|
|
45
26
|
shortString: string;
|
|
46
27
|
/**
|
|
47
28
|
* Get whether the event has expired
|
|
48
|
-
* @returns {boolean}
|
|
29
|
+
* @returns {boolean} whether this is expired
|
|
49
30
|
*/
|
|
50
31
|
getExpired(): boolean;
|
|
51
32
|
getCurrentZarimanCycle(): {
|
|
52
33
|
isCorpus: boolean;
|
|
53
|
-
timeLeft:
|
|
34
|
+
timeLeft: string;
|
|
54
35
|
expiry: Date;
|
|
55
|
-
expiresIn:
|
|
36
|
+
expiresIn: number;
|
|
56
37
|
state: string;
|
|
57
38
|
start: number;
|
|
58
39
|
};
|
|
40
|
+
#private;
|
|
59
41
|
}
|
|
60
|
-
import WorldstateObject
|
|
42
|
+
import WorldstateObject from './WorldstateObject.js';
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
export = Dependency;
|
|
2
1
|
/**
|
|
3
2
|
* Dependency Object
|
|
4
|
-
* @property {MarkdownSettings} mdConfig The markdown settings
|
|
5
|
-
* @property {Translator} translator The string translator
|
|
6
|
-
* @property {TimeDateFunctions} timeDate The time and date functions
|
|
7
|
-
* @property {Mission} Mission The Mission parser
|
|
8
|
-
* @property {Reward} Reward The Reward parser
|
|
9
3
|
* @property {string} locale Locale to use for translations
|
|
10
|
-
* @property {
|
|
4
|
+
* @property {object} logger Generic logger to use if needed
|
|
11
5
|
*/
|
|
12
|
-
|
|
6
|
+
export default class Dependency {
|
|
13
7
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export = ExternalMission;
|
|
2
1
|
/**
|
|
3
2
|
* External mission data retrieved from https://10o.io/kuvalog.json
|
|
4
|
-
* @typedef {
|
|
3
|
+
* @typedef {object} ExternalMission
|
|
5
4
|
* @property {Date} activation start time
|
|
6
5
|
* @property {Date} expiry end timer
|
|
7
6
|
* @property {string} node formatted node name with planet
|
|
@@ -11,15 +10,12 @@ export = ExternalMission;
|
|
|
11
10
|
* @property {boolean} sharkwing whether or not the tile requires
|
|
12
11
|
* sumbersible archwing
|
|
13
12
|
*/
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
declare namespace ExternalMission {
|
|
17
|
-
export { ExternalMission };
|
|
13
|
+
export default class ExternalMission {
|
|
18
14
|
}
|
|
19
15
|
/**
|
|
20
16
|
* External mission data retrieved from https://10o.io/kuvalog.json
|
|
21
17
|
*/
|
|
22
|
-
type ExternalMission = {
|
|
18
|
+
export type ExternalMission = {
|
|
23
19
|
/**
|
|
24
20
|
* start time
|
|
25
21
|
*/
|
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A collection of strings that are used by the parser to produce markdown-formatted text
|
|
3
|
+
* @property {string} lineEnd - Line return character
|
|
4
|
+
* @property {string} blockEnd - Block end string
|
|
5
|
+
* @property {string} doubleReturn - Double line return string
|
|
6
|
+
* @property {string} linkBegin - Link begin string
|
|
7
|
+
* @property {string} linkMid - Link middle string
|
|
8
|
+
* @property {string} linkEnd - Link end string
|
|
9
|
+
* @property {string} bold - String for denoting bold text
|
|
10
|
+
* @property {string} italic - String for denoting italicized text
|
|
11
|
+
* @property {string} underline - String for denoting underlined text
|
|
12
|
+
* @property {string} strike - String for denoting striked-through text
|
|
13
|
+
* @property {string} codeLine - String for denoting in-line code
|
|
14
|
+
* @property {string} codeBlock - String for denoting multi-line code blocks
|
|
15
|
+
*/
|
|
16
|
+
export default class MarkdownSettings {
|
|
17
|
+
static lineEnd: string;
|
|
18
|
+
static blockEnd: string;
|
|
19
|
+
static doubleReturn: string;
|
|
20
|
+
static linkBegin: string;
|
|
21
|
+
static linkMid: string;
|
|
22
|
+
static linkEnd: string;
|
|
23
|
+
static bold: string;
|
|
24
|
+
static italic: string;
|
|
25
|
+
static underline: string;
|
|
26
|
+
static strike: string;
|
|
27
|
+
static codeLine: string;
|
|
28
|
+
static codeBlock: string;
|
|
29
|
+
static spoiler: string;
|
|
16
30
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
export const nightmare: string[];
|
|
2
|
-
export const auras: string[];
|
|
3
1
|
export const resources: string[];
|
|
2
|
+
export const auras: string[];
|
|
3
|
+
export const nightmare: string[];
|
|
4
|
+
declare namespace _default {
|
|
5
|
+
export { nightmare };
|
|
6
|
+
export { auras };
|
|
7
|
+
export { resources };
|
|
8
|
+
}
|
|
9
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export
|
|
1
|
+
declare const _default: Array<RewardType>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function insist(thing: any, ...args: any[]): void;
|
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An object containing functions to format dates and times
|
|
3
|
-
*/
|
|
4
|
-
export type TimeDateFunctions = any;
|
|
5
1
|
/**
|
|
6
2
|
* @param {number} millis The number of milliseconds in the time delta
|
|
7
|
-
* @returns {string}
|
|
3
|
+
* @returns {string} formatted time delta
|
|
8
4
|
*/
|
|
9
5
|
export function timeDeltaToString(millis: number): string;
|
|
10
6
|
/**
|
|
11
7
|
* Returns the number of milliseconds between now and a given date
|
|
12
8
|
* @param {Date} d The date from which the current time will be subtracted
|
|
13
|
-
* @param {
|
|
14
|
-
* @returns {number}
|
|
9
|
+
* @param {Function} [now] A function that returns the current UNIX time in milliseconds
|
|
10
|
+
* @returns {number} The number of milliseconds after the given date to now
|
|
15
11
|
*/
|
|
16
12
|
export function fromNow(d: Date, now?: Function): number;
|
|
17
13
|
/**
|
|
18
14
|
* Returns the number of milliseconds between a given date and now
|
|
19
15
|
* @param {Date} d The date that the current time will be subtracted from
|
|
20
|
-
* @param {
|
|
21
|
-
* @returns {number}
|
|
16
|
+
* @param {Function} [now] A function that returns the current UNIX time in milliseconds
|
|
17
|
+
* @returns {number} The number of milliseconds after now to the given date
|
|
22
18
|
*/
|
|
23
19
|
export function toNow(d: Date, now?: Function): number;
|
|
24
20
|
/**
|
|
25
21
|
* Returns a new Date constructed from a worldState date object
|
|
26
|
-
* @param {
|
|
27
|
-
* @returns {Date}
|
|
22
|
+
* @param {object} d The worldState date object
|
|
23
|
+
* @returns {Date} parsed date from DE date format
|
|
24
|
+
*/
|
|
25
|
+
export function parseDate(d: object): Date;
|
|
26
|
+
declare namespace _default {
|
|
27
|
+
export { timeDeltaToString };
|
|
28
|
+
export { fromNow };
|
|
29
|
+
export { toNow };
|
|
30
|
+
export { parseDate };
|
|
31
|
+
}
|
|
32
|
+
export default _default;
|
|
33
|
+
/**
|
|
34
|
+
* An object containing functions to format dates and times
|
|
28
35
|
*/
|
|
29
|
-
export
|
|
36
|
+
export type TimeDateFunctions = Record<string, Function>;
|