@wfcd/profile-parser 1.0.2 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wfcd/profile-parser",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "Parser for Digital Extreme's profile data",
5
5
  "type": "module",
6
6
  "main": "src/ProfileParser.js",
@@ -5,6 +5,11 @@ import { archonShardColor, archonShardUpgradeType } from 'warframe-worldstate-da
5
5
  * @module
6
6
  */
7
7
  export default class ArchonCrystal {
8
+ /**
9
+ *
10
+ * @param {Object} crystal The archon crystal object
11
+ * @param {string} local The locale to get translations in
12
+ */
8
13
  constructor(crystal, local) {
9
14
  /**
10
15
  * Archon shard color
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class ChallengeProgress {
6
+ /**
7
+ *
8
+ * @param {Object} challenge The challenge object to parse
9
+ */
6
10
  constructor(challenge) {
7
11
  /**
8
12
  * Name of the challenge
package/src/Enemy.js CHANGED
@@ -4,6 +4,7 @@
4
4
  */
5
5
  export default class Enemy {
6
6
  /**
7
+ *
7
8
  * @param {Object} enemy The enemy
8
9
  */
9
10
  constructor(enemy) {
package/src/Intrinsics.js CHANGED
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class Intrinsics {
6
+ /**
7
+ *
8
+ * @param {Object} skills The intrinsics object
9
+ */
6
10
  constructor(skills) {
7
11
  // I know this is railjack but I'm not sure what the context is
8
12
  /**
package/src/ItemConfig.js CHANGED
@@ -1,5 +1,6 @@
1
- import { colors, find } from 'warframe-items/utilities';
1
+ import { colors } from 'warframe-items/utilities';
2
2
 
3
+ import Skin from './Skin.js';
3
4
  import mapToHex from './Util.js';
4
5
 
5
6
  /**
@@ -8,6 +9,7 @@ import mapToHex from './Util.js';
8
9
  */
9
10
  export default class ItemConfig {
10
11
  /**
12
+ *
11
13
  * @param {Object} config The configuration
12
14
  */
13
15
  constructor(config) {
@@ -15,9 +17,7 @@ export default class ItemConfig {
15
17
  * Array of unique names for the skins applied to item
16
18
  * @type {Array<String>}
17
19
  */
18
- this.skins = config.Skins.filter(Boolean)
19
- .map((s) => find.findItem(s))
20
- .filter(Boolean);
20
+ this.skins = config.Skins.filter(Boolean).map((s) => new Skin({ ItemType: s }));
21
21
 
22
22
  /**
23
23
  * Array of PVP unique name upgrades applied
@@ -27,25 +27,25 @@ export default class ItemConfig {
27
27
 
28
28
  /**
29
29
  * Primary colors applied to item if they exist
30
- * @type {module:"warframe-items".ColorMap}
30
+ * @type {module:"warframe-items".ColorMap | undefined}
31
31
  */
32
32
  if (config.pricol) this.primaryColor = colors.mapColors(mapToHex(config.pricol));
33
33
 
34
34
  /**
35
35
  * Sigil colors applied to item if they exist
36
- * @type {module:"warframe-items".ColorMap}
36
+ * @type {module:("warframe-items").ColorMap | undefined}
37
37
  */
38
38
  if (config.sigcol) this.sigilColor = colors.mapColors(mapToHex(config.sigcol));
39
39
 
40
40
  /**
41
41
  * Attachment colors applied to item if they exist
42
- * @type {module:"warframe-items".ColorMap}
42
+ * @type {module:"warframe-items".ColorMap | undefined}
43
43
  */
44
44
  if (config.attcol) this.attachmentsColor = colors.mapColors(mapToHex(config.attcol));
45
45
 
46
46
  /**
47
47
  * Syandana colors applied to item if they exist
48
- * @type {module:"warframe-items".ColorMap}
48
+ * @type {module:"warframe-items".ColorMap | undefined}
49
49
  */
50
50
  if (config.syancol) this.syandanaColor = colors.mapColors(mapToHex(config.syancol));
51
51
  }
@@ -1,5 +1,5 @@
1
1
  import LoadOutItem from './LoadOutItem.js';
2
- import WeaponSkin from './WeaponSkin.js';
2
+ import Skin from './Skin.js';
3
3
  import XpInfo from './XpInfo.js';
4
4
 
5
5
  /**
@@ -7,12 +7,16 @@ import XpInfo from './XpInfo.js';
7
7
  * @module
8
8
  */
9
9
  export default class LoadOutInventory {
10
+ /**
11
+ *
12
+ * @param {Object} item The loadout data
13
+ */
10
14
  constructor(item) {
11
15
  /**
12
16
  * Skins applied to weapons
13
17
  * @type {WeaponSkin}
14
18
  */
15
- this.weaponSkins = item.WeaponSkins.map((s) => new WeaponSkin(s));
19
+ this.weaponSkins = item.WeaponSkins.map((s) => new Skin(s));
16
20
 
17
21
  /**
18
22
  * An array of the player's currently equiped Warframe (or powersuits)
@@ -9,6 +9,10 @@ import Polarity from './Polarity.js';
9
9
  * @module
10
10
  */
11
11
  export default class LoadOutItem {
12
+ /**
13
+ *
14
+ * @param {Object} weapon The loadout item from LoadoutInventory
15
+ */
12
16
  constructor(weapon) {
13
17
  /**
14
18
  * Item ID
@@ -108,31 +112,31 @@ export default class LoadOutItem {
108
112
 
109
113
  /**
110
114
  * Primary colors applied to item if they exist
111
- * @type {ColorMap}
115
+ * @type {module:"warframe-items".ColorMap | undefined}
112
116
  */
113
117
  if (weapon.pricol) this.primaryColor = colors.mapColors(weapon.pricol);
114
118
 
115
119
  /**
116
120
  * Sigil colors applied to item if they exist
117
- * @type {ColorMap}
121
+ * @type {module:"warframe-items".ColorMap | undefined}
118
122
  */
119
123
  if (weapon.sigcol) this.sigilColor = colors.mapColors(weapon.sigcol.toString(16));
120
124
 
121
125
  /**
122
126
  * Attachment colors applied to item if they exist
123
- * @type {ColorMap}
127
+ * @type {module:"warframe-items".ColorMap | undefined}
124
128
  */
125
129
  if (weapon.attcol) this.attachmentsColor = colors.mapColors(weapon.attcol.toString(16));
126
130
 
127
131
  /**
128
132
  * Syandana colors applied to item if they exist
129
- * @type {ColorMap}
133
+ * @type {module:"warframe-items".ColorMap | undefined}
130
134
  */
131
135
  if (weapon.syancol) this.syandanaColor = colors.mapColors(weapon.syancol.toString(16));
132
136
 
133
137
  /**
134
138
  * If set will show when the player's warframe was infested.
135
- * @type {ColorMap}
139
+ * @type {module:"warframe-items".ColorMap | undefined}
136
140
  */
137
141
  if (weapon.InfestationDate) this.infestationDate = parseDate(weapon.InfestationDate);
138
142
  }
package/src/Mission.js CHANGED
@@ -5,8 +5,13 @@ import { node, nodeEnemy, nodeMissionType } from 'warframe-worldstate-data/utili
5
5
  * @module
6
6
  */
7
7
  export default class Mission {
8
+ /**
9
+ *
10
+ * @param {Object} mission The mission data
11
+ * @param {string} locale The locale to return in
12
+ */
8
13
  constructor(mission, locale) {
9
- const uniqueName = mission.Type || mission.Tag;
14
+ const uniqueName = mission.type || mission.Tag;
10
15
 
11
16
  /**
12
17
  * Node name
@@ -18,7 +23,7 @@ export default class Mission {
18
23
  * Node mission type
19
24
  * @type {String}
20
25
  */
21
- this.misstionType = nodeMissionType(uniqueName, locale);
26
+ this.missionType = nodeMissionType(uniqueName, locale);
22
27
 
23
28
  /**
24
29
  * Node faction
@@ -28,17 +33,20 @@ export default class Mission {
28
33
 
29
34
  /**
30
35
  * Highest score earned in this mission
31
- * @type {number}
36
+ * @type {number | undefined}
32
37
  */
33
- if (mission.highScore) this.highScore = mission.HighScore;
38
+ if (mission.highScore) this.highScore = mission.highScore;
34
39
 
35
40
  /**
36
41
  * How many times the mission was completed
37
- * @type {number}
42
+ * @type {number | undefined}
38
43
  */
39
44
  if (mission.Completes) this.completes = mission.Completes;
40
45
 
41
- // Not sure.
46
+ /**
47
+ * Denotes a steel path node
48
+ * @type {number | undefined}
49
+ */
42
50
  if (mission.Tier) this.tier = mission.Tier;
43
51
  }
44
52
  }
@@ -1,5 +1,6 @@
1
1
  import { colors } from 'warframe-items/utilities';
2
2
 
3
+ import Skin from './Skin.js';
3
4
  import mapToHex from './Util.js';
4
5
 
5
6
  /**
@@ -7,12 +8,16 @@ import mapToHex from './Util.js';
7
8
  * @module
8
9
  */
9
10
  export default class OperatorLoadOuts {
11
+ /**
12
+ *
13
+ * @param {Object} loadout The operator loadout
14
+ */
10
15
  constructor(loadout) {
11
16
  /**
12
17
  * Skins that have been applied to the player's operator.
13
- * @type {Array<String>}
18
+ * @type {Array<Skin>}
14
19
  */
15
- this.skins = loadout.Skins;
20
+ this.skins = loadout.Skins.filter(Boolean).map((s) => new Skin({ ItemType: s }));
16
21
 
17
22
  /**
18
23
  * Operator amp ID
@@ -29,43 +34,43 @@ export default class OperatorLoadOuts {
29
34
 
30
35
  /**
31
36
  * Operator primary colors
32
- * @type {module:"warframe-items".ColorMap}
37
+ * @type {module:"warframe-items".ColorMap | undefined}
33
38
  */
34
39
  if (loadout.pricol) this.primaryColor = colors.mapColors(mapToHex(loadout.pricol));
35
40
 
36
41
  /**
37
42
  * Operator sigil colors
38
- * @type {module:"warframe-items".ColorMap}
43
+ * @type {module:"warframe-items".ColorMap | undefined}
39
44
  */
40
45
  if (loadout.sigcol) this.sigilColor = colors.mapColors(mapToHex(loadout.sigcol));
41
46
 
42
47
  /**
43
48
  * Operator attachment colors
44
- * @type {module:"warframe-items".ColorMap}
49
+ * @type {module:"warframe-items".ColorMap | undefined}
45
50
  */
46
51
  if (loadout.attcol) this.attachmentsColor = colors.mapColors(mapToHex(loadout.attcol));
47
52
 
48
53
  /**
49
54
  * Operator syandana colors
50
- * @type {module:"warframe-items".ColorMap}
55
+ * @type {module:"warframe-items".ColorMap | undefined}
51
56
  */
52
57
  if (loadout.syancol) this.syandanaColor = colors.mapColors(mapToHex(loadout.syancol));
53
58
 
54
59
  /**
55
60
  * Operator eye colors
56
- * @type {module:"warframe-items".ColorMap}
61
+ * @type {module:"warframe-items".ColorMap | undefined}
57
62
  */
58
63
  if (loadout.eyecol) this.eyeColor = colors.mapColors(mapToHex(loadout.eyecol));
59
64
 
60
65
  /**
61
66
  * Operator facial colors
62
- * @type {module:"warframe-items".ColorMap}
67
+ * @type {module:"warframe-items".ColorMap | undefined}
63
68
  */
64
69
  if (loadout.facial) this.facial = colors.mapColors(mapToHex(loadout.facial));
65
70
 
66
71
  /**
67
72
  * Operator cloth colors
68
- * @type {module:"warframe-items".ColorMap}
73
+ * @type {module:"warframe-items".ColorMap | undefined}
69
74
  */
70
75
  if (loadout.cloth) this.cloth = colors.mapColors(mapToHex(loadout.cloth));
71
76
  }
package/src/Polarity.js CHANGED
@@ -5,6 +5,10 @@ import { translatePolarity } from 'warframe-worldstate-data/utilities';
5
5
  * @module
6
6
  */
7
7
  export default class Polarity {
8
+ /**
9
+ *
10
+ * @param {Object} polarity The polarity to parse
11
+ */
8
12
  constructor(polarity) {
9
13
  /**
10
14
  * Polarity name
package/src/Profile.js CHANGED
@@ -12,6 +12,11 @@ import Syndicate from './Syndicate.js';
12
12
  * @module
13
13
  */
14
14
  export default class Profile {
15
+ /**
16
+ *
17
+ * @param {Object} profile The profile data to parse
18
+ * @param {string} locale The locale to return in where possible
19
+ */
15
20
  constructor(profile, locale) {
16
21
  /**
17
22
  * Player's acount ID
@@ -8,6 +8,11 @@ import Stats from './Stats.js';
8
8
  * @module
9
9
  */
10
10
  export default class ProfileParser {
11
+ /**
12
+ *
13
+ * @param {Object} data The data returned by getProfile endpoint
14
+ * @param {string} locale The locale to return where possible
15
+ */
11
16
  constructor(data, locale) {
12
17
  /**
13
18
  * Player's profile
package/src/Pvp.js CHANGED
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class Pvp {
6
+ /**
7
+ *
8
+ * @param {Object} pvp PVP data to parse
9
+ */
6
10
  constructor(pvp) {
7
11
  /**
8
12
  * PVP match unique name
@@ -12,19 +16,19 @@ export default class Pvp {
12
16
 
13
17
  /**
14
18
  * Deaths for this match
15
- * @type {number}
19
+ * @type {number | undefined}
16
20
  */
17
21
  this.suitDeaths = pvp.suitDeaths;
18
22
 
19
23
  /**
20
24
  * Warframe kills
21
- * @type {number}
25
+ * @type {number | undefined}
22
26
  */
23
27
  this.suitKills = pvp.suitKills;
24
28
 
25
29
  /**
26
30
  * Weapon killes
27
- * @type {number}
31
+ * @type {number | undefined}
28
32
  */
29
33
  this.weaponKills = pvp.weaponKills;
30
34
  }
package/src/Race.js CHANGED
@@ -3,17 +3,31 @@
3
3
  * @module
4
4
  */
5
5
  export default class Race {
6
- constructor(race) {
6
+ /**
7
+ *
8
+ * @param {string} type Race name
9
+ * @param {number} highScore high score
10
+ */
11
+ constructor(type, highScore) {
7
12
  /**
8
13
  * Race name
9
14
  * @type {String}
10
15
  */
11
- this.uniqueName = race.type;
16
+ this.uniqueName = type;
12
17
 
13
18
  /**
14
19
  * Race High score
15
20
  * @type {number}
16
21
  */
17
- this.highScore = race.highScore;
22
+ this.highScore = highScore;
23
+ }
24
+
25
+ /**
26
+ * Created an array of Race objects from DE's Races array
27
+ * @param {Object} races Array of races
28
+ * @returns {Race[]} An array of races formatted in a more consumable way.
29
+ */
30
+ static fromRaceObject(races) {
31
+ return Object.entries(races).map(([type, { highScore }]) => new Race(type, highScore));
18
32
  }
19
33
  }
package/src/Scan.js CHANGED
@@ -3,6 +3,9 @@
3
3
  * @module
4
4
  */
5
5
  export default class Scan {
6
+ /**
7
+ * @param {Object} scan The scanned Warframe object
8
+ */
6
9
  constructor(scan) {
7
10
  /**
8
11
  * Enemy unique name
package/src/Skin.js ADDED
@@ -0,0 +1,32 @@
1
+ import { find } from 'warframe-items/utilities';
2
+
3
+ /**
4
+ * A skin class
5
+ * @module
6
+ */
7
+ export default class Skin {
8
+ /**
9
+ *
10
+ * @param {Object} skin The skin data to parse
11
+ */
12
+ constructor(skin) {
13
+ /**
14
+ * Unique name
15
+ * @type {String}
16
+ */
17
+ this.uniqueName = skin.ItemType;
18
+
19
+ const item = find.findItem(skin.ItemType);
20
+ /**
21
+ * The Warframe item that matches the unique name
22
+ */
23
+ if (item) this.item = item;
24
+ }
25
+ }
26
+
27
+ /**
28
+ * @deprecated Move to Skin, this is just here to not break anything for early users
29
+ * @param {Object} skin Skin object
30
+ * @returns {Skin} Skin object with possible item
31
+ */
32
+ export const WeaponSkin = (skin) => new Skin(skin);
package/src/Stats.js CHANGED
@@ -174,7 +174,7 @@ export default class Stats {
174
174
 
175
175
  /**
176
176
  * Event Scores for Operation breeding grounds
177
- * @type {Map<String,numbert>}
177
+ * @type {Map<String,number>}
178
178
  */
179
179
  this.breedGrounds = {
180
180
  personalScore: stats.HiveEventScore,
@@ -183,7 +183,7 @@ export default class Stats {
183
183
 
184
184
  /**
185
185
  * Event Scores for The Gradivus Dilemma
186
- * @type {Map<String,numbert>}
186
+ * @type {Map<String,number>}
187
187
  */
188
188
  this.gradivusDilemma = {
189
189
  grineer: stats.InvasionEventGrineerScore,
@@ -191,7 +191,7 @@ export default class Stats {
191
191
  };
192
192
 
193
193
  /**
194
- * List of scans
194
+ * List of scanned Warframe objects
195
195
  * @type {Array<Scan>}
196
196
  */
197
197
  this.scans = stats.Scans.map((s) => new Scan(s));
@@ -288,7 +288,7 @@ export default class Stats {
288
288
  this.orphixVenomScore = stats.MechSurvivalScoreMax;
289
289
  this.happyZephyrScore = stats.ZephyrScore;
290
290
 
291
- this.kDriveRaces = Object.entries(stats.Races).map(([type, { highScore }]) => new Race({ type, highScore }));
291
+ this.kDriveRaces = Race.fromRaceObject(stats.Races);
292
292
 
293
293
  /**
294
294
  * Operation Gate Crash event
package/src/Weapon.js CHANGED
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class Weapon {
6
+ /**
7
+ *
8
+ * @param {Object} weapon The weapon stats being parsed
9
+ */
6
10
  constructor(weapon) {
7
11
  /**
8
12
  * Weapon unique name
package/src/XpInfo.js CHANGED
@@ -5,6 +5,10 @@ import { find } from 'warframe-items/utilities';
5
5
  * @module
6
6
  */
7
7
  export default class XpInfo {
8
+ /**
9
+ *
10
+ * @param {Object} info The info for a given ranked item
11
+ */
8
12
  constructor(info) {
9
13
  /**
10
14
  * Unique name
@@ -3,7 +3,12 @@
3
3
  * @module
4
4
  */
5
5
  export default class ArchonCrystal {
6
- constructor(crystal: any, local: any);
6
+ /**
7
+ *
8
+ * @param {Object} crystal The archon crystal object
9
+ * @param {string} local The locale to get translations in
10
+ */
11
+ constructor(crystal: any, local: string);
7
12
  /**
8
13
  * Archon shard color
9
14
  * @type {String}
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class ChallengeProgress {
6
+ /**
7
+ *
8
+ * @param {Object} challenge The challenge object to parse
9
+ */
6
10
  constructor(challenge: any);
7
11
  /**
8
12
  * Name of the challenge
package/types/Enemy.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  */
5
5
  export default class Enemy {
6
6
  /**
7
+ *
7
8
  * @param {Object} enemy The enemy
8
9
  */
9
10
  constructor(enemy: any);
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class Intrinsics {
6
+ /**
7
+ *
8
+ * @param {Object} skills The intrinsics object
9
+ */
6
10
  constructor(skills: any);
7
11
  /**
8
12
  * @type {number}
@@ -4,6 +4,7 @@
4
4
  */
5
5
  export default class ItemConfig {
6
6
  /**
7
+ *
7
8
  * @param {Object} config The configuration
8
9
  */
9
10
  constructor(config: any);
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class LoadOutInventory {
6
+ /**
7
+ *
8
+ * @param {Object} item The loadout data
9
+ */
6
10
  constructor(item: any);
7
11
  /**
8
12
  * Skins applied to weapons
@@ -35,6 +39,5 @@ export default class LoadOutInventory {
35
39
  */
36
40
  xpInfo: XpInfo;
37
41
  }
38
- import WeaponSkin from './WeaponSkin.js';
39
42
  import LoadOutItem from './LoadOutItem.js';
40
43
  import XpInfo from './XpInfo.js';
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class LoadOutItem {
6
+ /**
7
+ *
8
+ * @param {Object} weapon The loadout item from LoadoutInventory
9
+ */
6
10
  constructor(weapon: any);
7
11
  /**
8
12
  * Item ID
@@ -3,7 +3,12 @@
3
3
  * @module
4
4
  */
5
5
  export default class Mission {
6
- constructor(mission: any, locale: any);
6
+ /**
7
+ *
8
+ * @param {Object} mission The mission data
9
+ * @param {string} locale The locale to return in
10
+ */
11
+ constructor(mission: any, locale: string);
7
12
  /**
8
13
  * Node name
9
14
  * @type {String}
@@ -13,7 +18,7 @@ export default class Mission {
13
18
  * Node mission type
14
19
  * @type {String}
15
20
  */
16
- misstionType: string;
21
+ missionType: string;
17
22
  /**
18
23
  * Node faction
19
24
  * @type {String}
@@ -3,12 +3,16 @@
3
3
  * @module
4
4
  */
5
5
  export default class OperatorLoadOuts {
6
+ /**
7
+ *
8
+ * @param {Object} loadout The operator loadout
9
+ */
6
10
  constructor(loadout: any);
7
11
  /**
8
12
  * Skins that have been applied to the player's operator.
9
- * @type {Array<String>}
13
+ * @type {Array<Skin>}
10
14
  */
11
- skins: Array<string>;
15
+ skins: Array<Skin>;
12
16
  /**
13
17
  * Operator amp ID
14
18
  * @type {String | undefined}
@@ -28,3 +32,4 @@ export default class OperatorLoadOuts {
28
32
  facial: any;
29
33
  cloth: any;
30
34
  }
35
+ import Skin from './Skin.js';
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class Polarity {
6
+ /**
7
+ *
8
+ * @param {Object} polarity The polarity to parse
9
+ */
6
10
  constructor(polarity: any);
7
11
  /**
8
12
  * Polarity name
@@ -3,7 +3,12 @@
3
3
  * @module
4
4
  */
5
5
  export default class Profile {
6
- constructor(profile: any, locale: any);
6
+ /**
7
+ *
8
+ * @param {Object} profile The profile data to parse
9
+ * @param {string} locale The locale to return in where possible
10
+ */
11
+ constructor(profile: any, locale: string);
7
12
  /**
8
13
  * Player's acount ID
9
14
  * @type {Stirng}
@@ -3,7 +3,12 @@
3
3
  * @module
4
4
  */
5
5
  export default class ProfileParser {
6
- constructor(data: any, locale: any);
6
+ /**
7
+ *
8
+ * @param {Object} data The data returned by getProfile endpoint
9
+ * @param {string} locale The locale to return where possible
10
+ */
11
+ constructor(data: any, locale: string);
7
12
  /**
8
13
  * Player's profile
9
14
  * @type {Profile}
package/types/Pvp.d.ts CHANGED
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class Pvp {
6
+ /**
7
+ *
8
+ * @param {Object} pvp PVP data to parse
9
+ */
6
10
  constructor(pvp: any);
7
11
  /**
8
12
  * PVP match unique name
@@ -11,17 +15,17 @@ export default class Pvp {
11
15
  uniqueName: string;
12
16
  /**
13
17
  * Deaths for this match
14
- * @type {number}
18
+ * @type {number | undefined}
15
19
  */
16
- suitDeaths: number;
20
+ suitDeaths: number | undefined;
17
21
  /**
18
22
  * Warframe kills
19
- * @type {number}
23
+ * @type {number | undefined}
20
24
  */
21
- suitKills: number;
25
+ suitKills: number | undefined;
22
26
  /**
23
27
  * Weapon killes
24
- * @type {number}
28
+ * @type {number | undefined}
25
29
  */
26
- weaponKills: number;
30
+ weaponKills: number | undefined;
27
31
  }
package/types/Race.d.ts CHANGED
@@ -3,7 +3,18 @@
3
3
  * @module
4
4
  */
5
5
  export default class Race {
6
- constructor(race: any);
6
+ /**
7
+ * Created an array of Race objects from DE's Races array
8
+ * @param {Object} races Array of races
9
+ * @returns {Race[]} An array of races formatted in a more consumable way.
10
+ */
11
+ static fromRaceObject(races: any): Race[];
12
+ /**
13
+ *
14
+ * @param {string} type Race name
15
+ * @param {number} highScore high score
16
+ */
17
+ constructor(type: string, highScore: number);
7
18
  /**
8
19
  * Race name
9
20
  * @type {String}
package/types/Scan.d.ts CHANGED
@@ -3,6 +3,9 @@
3
3
  * @module
4
4
  */
5
5
  export default class Scan {
6
+ /**
7
+ * @param {Object} scan The scanned Warframe object
8
+ */
6
9
  constructor(scan: any);
7
10
  /**
8
11
  * Enemy unique name
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A skin class
3
+ * @module
4
+ */
5
+ export default class Skin {
6
+ /**
7
+ *
8
+ * @param {Object} skin The skin data to parse
9
+ */
10
+ constructor(skin: any);
11
+ /**
12
+ * Unique name
13
+ * @type {String}
14
+ */
15
+ uniqueName: string;
16
+ item: any;
17
+ }
18
+ export function WeaponSkin(skin: any): Skin;
package/types/Stats.d.ts CHANGED
@@ -139,16 +139,16 @@ export default class Stats {
139
139
  healCount: number;
140
140
  /**
141
141
  * Event Scores for Operation breeding grounds
142
- * @type {Map<String,numbert>}
142
+ * @type {Map<String,number>}
143
143
  */
144
- breedGrounds: Map<string, numbert>;
144
+ breedGrounds: Map<string, number>;
145
145
  /**
146
146
  * Event Scores for The Gradivus Dilemma
147
- * @type {Map<String,numbert>}
147
+ * @type {Map<String,number>}
148
148
  */
149
- gradivusDilemma: Map<string, numbert>;
149
+ gradivusDilemma: Map<string, number>;
150
150
  /**
151
- * List of scans
151
+ * List of scanned Warframe objects
152
152
  * @type {Array<Scan>}
153
153
  */
154
154
  scans: Array<Scan>;
@@ -211,7 +211,7 @@ export default class Stats {
211
211
  scarletSpear: Map<string, number>;
212
212
  orphixVenomScore: any;
213
213
  happyZephyrScore: any;
214
- kDriveRaces: any;
214
+ kDriveRaces: Race[];
215
215
  /**
216
216
  * Operation Gate Crash event
217
217
  * @type {number}
@@ -257,3 +257,4 @@ import Enemy from './Enemy.js';
257
257
  import Mission from './Mission.js';
258
258
  import Scan from './Scan.js';
259
259
  import Pvp from './Pvp.js';
260
+ import Race from './Race.js';
package/types/Weapon.d.ts CHANGED
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class Weapon {
6
+ /**
7
+ *
8
+ * @param {Object} weapon The weapon stats being parsed
9
+ */
6
10
  constructor(weapon: any);
7
11
  /**
8
12
  * Weapon unique name
package/types/XpInfo.d.ts CHANGED
@@ -3,6 +3,10 @@
3
3
  * @module
4
4
  */
5
5
  export default class XpInfo {
6
+ /**
7
+ *
8
+ * @param {Object} info The info for a given ranked item
9
+ */
6
10
  constructor(info: any);
7
11
  /**
8
12
  * Unique name
package/src/WeaponSkin.js DELETED
@@ -1,13 +0,0 @@
1
- /**
2
- * A weapon skin
3
- * @module
4
- */
5
- export default class WeaponSkin {
6
- constructor(skin) {
7
- /**
8
- * Unique name
9
- * @type {String}
10
- */
11
- this.unuqueName = skin.ItemType;
12
- }
13
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * A weapon skin
3
- * @module
4
- */
5
- export default class WeaponSkin {
6
- constructor(skin: any);
7
- /**
8
- * Unique name
9
- * @type {String}
10
- */
11
- unuqueName: string;
12
- }