@wfcd/profile-parser 1.0.1 → 1.0.2

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.
Files changed (46) hide show
  1. package/README.md +29 -1
  2. package/package.json +4 -5
  3. package/src/Ability.js +2 -1
  4. package/src/ArchonCrystal.js +13 -0
  5. package/src/ChallengeProgress.js +4 -0
  6. package/src/Enemy.js +3 -2
  7. package/src/Intrinsics.js +4 -0
  8. package/src/ItemConfig.js +2 -1
  9. package/src/LoadOutInventory.js +10 -6
  10. package/src/LoadOutItem.js +6 -2
  11. package/src/Mission.js +4 -0
  12. package/src/OperatorLoadOuts.js +6 -2
  13. package/src/Polarity.js +4 -0
  14. package/src/Profile.js +6 -2
  15. package/src/ProfileParser.js +16 -4
  16. package/src/Pvp.js +4 -0
  17. package/src/Race.js +4 -0
  18. package/src/Scan.js +4 -0
  19. package/src/Stats.js +2 -1
  20. package/src/Syndicate.js +7 -3
  21. package/src/Util.js +2 -0
  22. package/src/Weapon.js +4 -0
  23. package/src/WeaponSkin.js +4 -0
  24. package/src/XpInfo.js +4 -0
  25. package/types/Ability.d.ts +2 -1
  26. package/types/ArchonCrystal.d.ts +14 -2
  27. package/types/ChallengeProgress.d.ts +4 -0
  28. package/types/Enemy.d.ts +3 -2
  29. package/types/Intrinsics.d.ts +4 -0
  30. package/types/ItemConfig.d.ts +2 -1
  31. package/types/LoadOutInventory.d.ts +10 -6
  32. package/types/LoadOutItem.d.ts +6 -2
  33. package/types/Mission.d.ts +4 -0
  34. package/types/OperatorLoadOuts.d.ts +6 -2
  35. package/types/Polarity.d.ts +4 -0
  36. package/types/Profile.d.ts +6 -2
  37. package/types/ProfileParser.d.ts +20 -4
  38. package/types/Pvp.d.ts +4 -0
  39. package/types/Race.d.ts +4 -0
  40. package/types/Scan.d.ts +4 -0
  41. package/types/Stats.d.ts +2 -1
  42. package/types/Syndicate.d.ts +4 -2
  43. package/types/Util.d.ts +1 -0
  44. package/types/Weapon.d.ts +4 -0
  45. package/types/WeaponSkin.d.ts +4 -0
  46. package/types/XpInfo.d.ts +4 -0
package/README.md CHANGED
@@ -1 +1,29 @@
1
- # profile-parser
1
+ # profile-parser
2
+
3
+ Parse warframe profile data into useable javascript objects.
4
+
5
+ [![Supported by the Warframe Community Developers](https://img.shields.io/badge/Warframe_Comm_Devs-supported-blue.svg?color=2E96EF&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOTgiIGhlaWdodD0iMTczIiB2aWV3Qm94PSIwIDAgMjk4IDE3MyI%2BPHBhdGggZD0iTTE4NSA2N2MxNSA4IDI4IDE2IDMxIDE5czIzIDE4LTcgNjBjMCAwIDM1LTMxIDI2LTc5LTE0LTctNjItMzYtNzAtNDUtNC01LTEwLTEyLTE1LTIyLTUgMTAtOSAxNC0xNSAyMi0xMyAxMy01OCAzOC03MiA0NS05IDQ4IDI2IDc5IDI2IDc5LTMwLTQyLTEwLTU3LTctNjBsMzEtMTkgMzYtMjIgMzYgMjJ6TTU1IDE3M2wtMTctM2MtOC0xOS0yMC00NC0yNC01MC01LTctNy0xMS0xNC0xNWwxOC0yYzE2LTMgMjItNyAzMi0xMyAxIDYgMCA5IDIgMTQtNiA0LTIxIDEwLTI0IDE2IDMgMTQgNSAyNyAyNyA1M3ptMTYtMTFsLTktMi0xNC0yOWEzMCAzMCAwIDAgMC04LThoN2wxMy00IDQgN2MtMyAyLTcgMy04IDZhODYgODYgMCAwIDAgMTUgMzB6bTE3MiAxMWwxNy0zYzgtMTkgMjAtNDQgMjQtNTAgNS03IDctMTEgMTQtMTVsLTE4LTJjLTE2LTMtMjItNy0zMi0xMy0xIDYgMCA5LTIgMTQgNiA0IDIxIDEwIDI0IDE2LTMgMTQtNSAyNy0yNyA1M3ptLTE2LTExbDktMiAxNC0yOWEzMCAzMCAwIDAgMSA4LThoLTdsLTEzLTQtNCA3YzMgMiA3IDMgOCA2YTg2IDg2IDAgMCAxLTE1IDMwem0tNzktNDBsLTYtNmMtMSAzLTMgNi02IDdsNSA1YTUgNSAwIDAgMSAyIDB6bS0xMy0yYTQgNCAwIDAgMSAxLTJsMi0yYTQgNCAwIDAgMSAyLTFsNC0xNy0xNy0xMC04IDcgMTMgOC0yIDctNyAyLTgtMTItOCA4IDEwIDE3em0xMiAxMWE1IDUgMCAwIDAtNC0yIDQgNCAwIDAgMC0zIDFsLTMwIDI3YTUgNSAwIDAgMCAwIDdsNCA0YTYgNiAwIDAgMCA0IDIgNSA1IDAgMCAwIDMtMWwyNy0zMWMyLTIgMS01LTEtN3ptMzkgMjZsLTMwLTI4LTYgNmE1IDUgMCAwIDEgMCAzbDI2IDI5YTEgMSAwIDAgMCAxIDBsNS0yIDItMmMxLTIgMy01IDItNnptNS00NWEyIDIgMCAwIDAtNCAwbC0xIDEtMi00YzEtMy01LTktNS05LTEzLTE0LTIzLTE0LTI3LTEzLTIgMS0yIDEgMCAyIDE0IDIgMTUgMTAgMTMgMTNhNCA0IDAgMCAwLTEgMyAzIDMgMCAwIDAgMSAxbC0yMSAyMmE3IDcgMCAwIDEgNCAyIDggOCAwIDAgMSAyIDNsMjAtMjFhNyA3IDAgMCAwIDEgMSA0IDQgMCAwIDAgNCAwYzEtMSA2IDMgNyA0aC0xYTMgMyAwIDAgMCAwIDQgMiAyIDAgMCAwIDQgMGw2LTZhMyAzIDAgMCAwIDAtM3oiIGZpbGw9IiMyZTk2ZWYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg%3D%3D)](https://github.com/WFCD/banner/blob/master/PROJECTS.md)
6
+ [![Coverage Status](https://coveralls.io/repos/github/WFCD/warframe-worldstate-parser/badge.svg?branch=master)](https://coveralls.io/github/WFCD/profile-parser?branch=master)
7
+ [![Discord](https://img.shields.io/discord/256087517353213954.svg?logo=discord)](https://discord.gg/jGZxH9f)
8
+ [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
9
+
10
+ ## Documentation
11
+
12
+ You can find the documentation [here](https://wfcd.github.io/profile-parser/)
13
+
14
+ ## Installation
15
+
16
+ ```shell
17
+ $ npm i -S profile-parser
18
+ ```
19
+
20
+ ## Example usage
21
+
22
+ ```javascript
23
+ import { ProfileParser } from 'profile-parser';
24
+
25
+ const profileData = await fetch('https://content.warframe.com/dynamic/getProfileViewingData.php?n=${username}');
26
+ const user = new ProfileParser(await profileData.text());
27
+
28
+ console.log(user.profile.displayName);
29
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wfcd/profile-parser",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Parser for Digital Extreme's profile data",
5
5
  "type": "module",
6
6
  "main": "src/ProfileParser.js",
@@ -38,10 +38,9 @@
38
38
  "prepublishOnly": "npm run build:types",
39
39
  "build:docs": "jsdoc -c .github/docs/conf.json -d docs",
40
40
  "build:types": "tsc -p tsconfig.declaration.json",
41
- "postinstall": "if [ \"$NODE_ENV\" = \"dev\" ] ; then npx -p install-peerdeps@latest install-peerdeps @wfcd/eslint-config@latest -S ; fi",
42
- "prepare": "husky"
41
+ "prepare": "husky && if [ \"$NODE_ENV\" = \"dev\" ] ; then npx -p install-peerdeps@latest install-peerdeps @wfcd/eslint-config@latest -S ; fi"
43
42
  },
44
- "author": "",
43
+ "author": "SlayerOrnstein",
45
44
  "license": "MIT",
46
45
  "engines": {
47
46
  "node": ">=18.0.0"
@@ -97,7 +96,7 @@
97
96
  "prettier --write",
98
97
  "npm -q --no-progress dedupe"
99
98
  ],
100
- "*.{json,md,yaml}": [
99
+ "*.{json,md,yaml},!test/data/*.json": [
101
100
  "prettier --write"
102
101
  ]
103
102
  }
package/src/Ability.js CHANGED
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Represents an ability used by the player
2
+ * Represents a players used ability
3
+ * @module
3
4
  */
4
5
  export default class Ability {
5
6
  /**
@@ -1,8 +1,21 @@
1
1
  import { archonShardColor, archonShardUpgradeType } from 'warframe-worldstate-data/utilities';
2
2
 
3
+ /**
4
+ * Represents an Archon shard
5
+ * @module
6
+ */
3
7
  export default class ArchonCrystal {
4
8
  constructor(crystal, local) {
9
+ /**
10
+ * Archon shard color
11
+ * @type {String}
12
+ */
5
13
  this.color = archonShardColor(crystal.Color, local);
14
+
15
+ /**
16
+ * Archon shard modifier
17
+ * @type {String}
18
+ */
6
19
  this.modifier = archonShardUpgradeType(crystal.Color, crystal.UpgradeType, local);
7
20
  }
8
21
  }
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Player completed or in progress challenges
3
+ * @module
4
+ */
1
5
  export default class ChallengeProgress {
2
6
  constructor(challenge) {
3
7
  /**
package/src/Enemy.js CHANGED
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Represents the enemies killed
2
+ * An enemy killed/executed by player
3
+ * @module
3
4
  */
4
5
  export default class Enemy {
5
6
  /**
@@ -37,7 +38,7 @@ export default class Enemy {
37
38
  this.assists = enemy.assists;
38
39
 
39
40
  /**
40
- * How many times tis enemy type has killed the player
41
+ * How many times this enemy type has killed the player
41
42
  * @type {number}
42
43
  */
43
44
  this.deaths = enemy.deaths;
package/src/Intrinsics.js CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Player's intrinsics ranks
3
+ * @module
4
+ */
1
5
  export default class Intrinsics {
2
6
  constructor(skills) {
3
7
  // I know this is railjack but I'm not sure what the context is
package/src/ItemConfig.js CHANGED
@@ -3,7 +3,8 @@ import { colors, find } from 'warframe-items/utilities';
3
3
  import mapToHex from './Util.js';
4
4
 
5
5
  /**
6
- * Represents the data configuration for an item
6
+ * Item customizations such as colors and applied skins
7
+ * @module
7
8
  */
8
9
  export default class ItemConfig {
9
10
  /**
@@ -2,6 +2,10 @@ import LoadOutItem from './LoadOutItem.js';
2
2
  import WeaponSkin from './WeaponSkin.js';
3
3
  import XpInfo from './XpInfo.js';
4
4
 
5
+ /**
6
+ * Player loudout
7
+ * @module
8
+ */
5
9
  export default class LoadOutInventory {
6
10
  constructor(item) {
7
11
  /**
@@ -18,21 +22,21 @@ export default class LoadOutInventory {
18
22
 
19
23
  /**
20
24
  * An array of the player's currently equiped secondary weapon
21
- * @type {LoadOutItem}
25
+ * @type {LoadOutItem | undefined}
22
26
  */
23
- this.secondary = item.Pistols.map((p) => new LoadOutItem(p));
27
+ this.secondary = item.Pistols?.map((p) => new LoadOutItem(p));
24
28
 
25
29
  /**
26
30
  * An array of the player's currently equiped primary weapon
27
- * @type {LoadOutItem}
31
+ * @type {LoadOutItem | undefined}
28
32
  */
29
- this.primary = item.LongGuns.map((lg) => new LoadOutItem(lg));
33
+ this.primary = item.LongGuns?.map((lg) => new LoadOutItem(lg));
30
34
 
31
35
  /**
32
36
  * An array of the player's currently equiped melee weapon
33
- * @type {LoadOutItem}
37
+ * @type {LoadOutItem | undefined}
34
38
  */
35
- this.melee = item.Melee.map((m) => new LoadOutItem(m));
39
+ this.melee = item.Melee?.map((m) => new LoadOutItem(m));
36
40
 
37
41
  /**
38
42
  * Items that have counted towards the players mastery rank
@@ -4,6 +4,10 @@ import { parseDate, toTitleCase } from 'warframe-worldstate-data/utilities';
4
4
  import ItemConfig from './ItemConfig.js';
5
5
  import Polarity from './Polarity.js';
6
6
 
7
+ /**
8
+ * An an item in LoadOutInventory
9
+ * @module
10
+ */
7
11
  export default class LoadOutItem {
8
12
  constructor(weapon) {
9
13
  /**
@@ -86,9 +90,9 @@ export default class LoadOutItem {
86
90
 
87
91
  /**
88
92
  * Which polarity types exist on the weapon
89
- * @type {Array<Polarity>}
93
+ * @type {Array<Polarity> | undefined}
90
94
  */
91
- this.polarity = weapon.Polarity.map((p) => new Polarity(p));
95
+ this.polarity = weapon.Polarity?.map((p) => new Polarity(p));
92
96
 
93
97
  /**
94
98
  * Focus lens applied
package/src/Mission.js CHANGED
@@ -1,5 +1,9 @@
1
1
  import { node, nodeEnemy, nodeMissionType } from 'warframe-worldstate-data/utilities';
2
2
 
3
+ /**
4
+ * A mission completed by the player
5
+ * @module
6
+ */
3
7
  export default class Mission {
4
8
  constructor(mission, locale) {
5
9
  const uniqueName = mission.Type || mission.Tag;
@@ -2,6 +2,10 @@ import { colors } from 'warframe-items/utilities';
2
2
 
3
3
  import mapToHex from './Util.js';
4
4
 
5
+ /**
6
+ * Player's operator loadout
7
+ * @module
8
+ */
5
9
  export default class OperatorLoadOuts {
6
10
  constructor(loadout) {
7
11
  /**
@@ -12,9 +16,9 @@ export default class OperatorLoadOuts {
12
16
 
13
17
  /**
14
18
  * Operator amp ID
15
- * @type {String}
19
+ * @type {String | undefined}
16
20
  */
17
- this.operatorAmp = loadout.OperatorAmp.$oid;
21
+ this.operatorAmp = loadout.OperatorAmp?.$oid;
18
22
 
19
23
  /**
20
24
  * Applied upgrade IDs
package/src/Polarity.js CHANGED
@@ -1,5 +1,9 @@
1
1
  import { translatePolarity } from 'warframe-worldstate-data/utilities';
2
2
 
3
+ /**
4
+ * A polarity in a LoadOutItem
5
+ * @module
6
+ */
3
7
  export default class Polarity {
4
8
  constructor(polarity) {
5
9
  /**
package/src/Profile.js CHANGED
@@ -7,6 +7,10 @@ import Mission from './Mission.js';
7
7
  import OperatorLoadOuts from './OperatorLoadOuts.js';
8
8
  import Syndicate from './Syndicate.js';
9
9
 
10
+ /**
11
+ * A player's profile
12
+ * @module
13
+ */
10
14
  export default class Profile {
11
15
  constructor(profile, locale) {
12
16
  /**
@@ -176,9 +180,9 @@ export default class Profile {
176
180
 
177
181
  /**
178
182
  * Operator loadout
179
- * @type {OperatorLoadOuts}
183
+ * @type {OperatorLoadOuts | undefined}
180
184
  */
181
- this.operatorLoadouts = profile.OperatorLoadOuts.map((ol) => new OperatorLoadOuts(ol));
185
+ this.operatorLoadouts = profile.OperatorLoadOuts?.map((ol) => new OperatorLoadOuts(ol));
182
186
 
183
187
  /**
184
188
  * Player's alignment
@@ -3,6 +3,10 @@ import { parseDate } from 'warframe-worldstate-data/utilities';
3
3
  import Profile from './Profile.js';
4
4
  import Stats from './Stats.js';
5
5
 
6
+ /**
7
+ * Parser entry point
8
+ * @module
9
+ */
6
10
  export default class ProfileParser {
7
11
  constructor(data, locale) {
8
12
  /**
@@ -11,16 +15,24 @@ export default class ProfileParser {
11
15
  */
12
16
  this.profile = new Profile(data.Results[0], locale);
13
17
 
14
- // N/A
18
+ /**
19
+ * @type {number}
20
+ */
15
21
  this.techProjects = data.TechProjects;
16
22
 
17
- // N/A
23
+ /**
24
+ * @type {number}
25
+ */
18
26
  this.xpComponents = data.XpCompoents;
19
27
 
20
- // N/A
28
+ /**
29
+ * @type {number}
30
+ */
21
31
  this.xpCacheExpiryDate = parseDate(data.XpCacheExpiryDate);
22
32
 
23
- // N/A
33
+ /**
34
+ * @type {number}
35
+ */
24
36
  this.ceremonyResetDate = parseDate(data.CeremonyResetDate);
25
37
 
26
38
  /**
package/src/Pvp.js CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Player's conclave stats
3
+ * @module
4
+ */
1
5
  export default class Pvp {
2
6
  constructor(pvp) {
3
7
  /**
package/src/Race.js CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Represents a k-drive race
3
+ * @module
4
+ */
1
5
  export default class Race {
2
6
  constructor(race) {
3
7
  /**
package/src/Scan.js CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Represents an enemy scanned to the codex
3
+ * @module
4
+ */
1
5
  export default class Scan {
2
6
  constructor(scan) {
3
7
  /**
package/src/Stats.js CHANGED
@@ -7,7 +7,8 @@ import Scan from './Scan.js';
7
7
  import Weapon from './Weapon.js';
8
8
 
9
9
  /**
10
- * Player stats
10
+ * A player's overall career stats
11
+ * @module
11
12
  */
12
13
  export default class Stats {
13
14
  /**
package/src/Syndicate.js CHANGED
@@ -1,11 +1,15 @@
1
+ import { syndicate } from 'warframe-worldstate-data/utilities';
2
+
1
3
  /**
2
- * Represents a player's progress with a Syndicate
4
+ * Represents a syndicate
5
+ * @module
3
6
  */
4
7
  export default class Syndicate {
5
8
  /**
6
9
  * @param {Object} affiliation The syndicate data
10
+ * @param {string} locale locale code
7
11
  */
8
- constructor(affiliation) {
12
+ constructor(affiliation, locale) {
9
13
  // TODO: name is readable but still might want to clean them up
10
14
  // i.e "NewLokaSyndicate" can be "New Loka"" instead
11
15
 
@@ -13,7 +17,7 @@ export default class Syndicate {
13
17
  * Name of the syndicate
14
18
  * @type {String}
15
19
  */
16
- this.name = affiliation.Tag;
20
+ this.name = syndicate(affiliation.Tag, locale);
17
21
 
18
22
  /**
19
23
  * Current standing the player has with the syndicate
package/src/Util.js CHANGED
@@ -1,3 +1,5 @@
1
+ /** @module */
2
+
1
3
  /**
2
4
  * Map base10 int colors to hex color strings
3
5
  * @param {Record<string, number | undefined>} colors color map
package/src/Weapon.js CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Represents a player's used weapon stats
3
+ * @module
4
+ */
1
5
  export default class Weapon {
2
6
  constructor(weapon) {
3
7
  /**
package/src/WeaponSkin.js CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A weapon skin
3
+ * @module
4
+ */
1
5
  export default class WeaponSkin {
2
6
  constructor(skin) {
3
7
  /**
package/src/XpInfo.js CHANGED
@@ -1,5 +1,9 @@
1
1
  import { find } from 'warframe-items/utilities';
2
2
 
3
+ /**
4
+ * An item that has contributed to a player's mastery rank
5
+ * @module
6
+ */
3
7
  export default class XpInfo {
4
8
  constructor(info) {
5
9
  /**
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Represents an ability used by the player
2
+ * Represents a players used ability
3
+ * @module
3
4
  */
4
5
  export default class Ability {
5
6
  /**
@@ -1,5 +1,17 @@
1
+ /**
2
+ * Represents an Archon shard
3
+ * @module
4
+ */
1
5
  export default class ArchonCrystal {
2
6
  constructor(crystal: any, local: any);
3
- color: any;
4
- modifier: any;
7
+ /**
8
+ * Archon shard color
9
+ * @type {String}
10
+ */
11
+ color: string;
12
+ /**
13
+ * Archon shard modifier
14
+ * @type {String}
15
+ */
16
+ modifier: string;
5
17
  }
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Player completed or in progress challenges
3
+ * @module
4
+ */
1
5
  export default class ChallengeProgress {
2
6
  constructor(challenge: any);
3
7
  /**
package/types/Enemy.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Represents the enemies killed
2
+ * An enemy killed/executed by player
3
+ * @module
3
4
  */
4
5
  export default class Enemy {
5
6
  /**
@@ -32,7 +33,7 @@ export default class Enemy {
32
33
  */
33
34
  assists: number;
34
35
  /**
35
- * How many times tis enemy type has killed the player
36
+ * How many times this enemy type has killed the player
36
37
  * @type {number}
37
38
  */
38
39
  deaths: number;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Player's intrinsics ranks
3
+ * @module
4
+ */
1
5
  export default class Intrinsics {
2
6
  constructor(skills: any);
3
7
  /**
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Represents the data configuration for an item
2
+ * Item customizations such as colors and applied skins
3
+ * @module
3
4
  */
4
5
  export default class ItemConfig {
5
6
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Player loudout
3
+ * @module
4
+ */
1
5
  export default class LoadOutInventory {
2
6
  constructor(item: any);
3
7
  /**
@@ -12,19 +16,19 @@ export default class LoadOutInventory {
12
16
  suits: LoadOutItem;
13
17
  /**
14
18
  * An array of the player's currently equiped secondary weapon
15
- * @type {LoadOutItem}
19
+ * @type {LoadOutItem | undefined}
16
20
  */
17
- secondary: LoadOutItem;
21
+ secondary: LoadOutItem | undefined;
18
22
  /**
19
23
  * An array of the player's currently equiped primary weapon
20
- * @type {LoadOutItem}
24
+ * @type {LoadOutItem | undefined}
21
25
  */
22
- primary: LoadOutItem;
26
+ primary: LoadOutItem | undefined;
23
27
  /**
24
28
  * An array of the player's currently equiped melee weapon
25
- * @type {LoadOutItem}
29
+ * @type {LoadOutItem | undefined}
26
30
  */
27
- melee: LoadOutItem;
31
+ melee: LoadOutItem | undefined;
28
32
  /**
29
33
  * Items that have counted towards the players mastery rank
30
34
  * @type {XpInfo}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * An an item in LoadOutInventory
3
+ * @module
4
+ */
1
5
  export default class LoadOutItem {
2
6
  constructor(weapon: any);
3
7
  /**
@@ -56,9 +60,9 @@ export default class LoadOutItem {
56
60
  polarized: number;
57
61
  /**
58
62
  * Which polarity types exist on the weapon
59
- * @type {Array<Polarity>}
63
+ * @type {Array<Polarity> | undefined}
60
64
  */
61
- polarity: Array<Polarity>;
65
+ polarity: Array<Polarity> | undefined;
62
66
  /**
63
67
  * Focus lens applied
64
68
  * @type {String}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A mission completed by the player
3
+ * @module
4
+ */
1
5
  export default class Mission {
2
6
  constructor(mission: any, locale: any);
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Player's operator loadout
3
+ * @module
4
+ */
1
5
  export default class OperatorLoadOuts {
2
6
  constructor(loadout: any);
3
7
  /**
@@ -7,9 +11,9 @@ export default class OperatorLoadOuts {
7
11
  skins: Array<string>;
8
12
  /**
9
13
  * Operator amp ID
10
- * @type {String}
14
+ * @type {String | undefined}
11
15
  */
12
- operatorAmp: string;
16
+ operatorAmp: string | undefined;
13
17
  /**
14
18
  * Applied upgrade IDs
15
19
  * @type {Array<String>}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A polarity in a LoadOutItem
3
+ * @module
4
+ */
1
5
  export default class Polarity {
2
6
  constructor(polarity: any);
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A player's profile
3
+ * @module
4
+ */
1
5
  export default class Profile {
2
6
  constructor(profile: any, locale: any);
3
7
  /**
@@ -128,9 +132,9 @@ export default class Profile {
128
132
  unlockedAlignment: bool;
129
133
  /**
130
134
  * Operator loadout
131
- * @type {OperatorLoadOuts}
135
+ * @type {OperatorLoadOuts | undefined}
132
136
  */
133
- operatorLoadouts: OperatorLoadOuts;
137
+ operatorLoadouts: OperatorLoadOuts | undefined;
134
138
  /**
135
139
  * Player's alignment
136
140
  * @type {Map<String,number>}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Parser entry point
3
+ * @module
4
+ */
1
5
  export default class ProfileParser {
2
6
  constructor(data: any, locale: any);
3
7
  /**
@@ -5,10 +9,22 @@ export default class ProfileParser {
5
9
  * @type {Profile}
6
10
  */
7
11
  profile: Profile;
8
- techProjects: any;
9
- xpComponents: any;
10
- xpCacheExpiryDate: any;
11
- ceremonyResetDate: any;
12
+ /**
13
+ * @type {number}
14
+ */
15
+ techProjects: number;
16
+ /**
17
+ * @type {number}
18
+ */
19
+ xpComponents: number;
20
+ /**
21
+ * @type {number}
22
+ */
23
+ xpCacheExpiryDate: number;
24
+ /**
25
+ * @type {number}
26
+ */
27
+ ceremonyResetDate: number;
12
28
  /**
13
29
  * Player stats
14
30
  * @type {Stats}
package/types/Pvp.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Player's conclave stats
3
+ * @module
4
+ */
1
5
  export default class Pvp {
2
6
  constructor(pvp: any);
3
7
  /**
package/types/Race.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Represents a k-drive race
3
+ * @module
4
+ */
1
5
  export default class Race {
2
6
  constructor(race: any);
3
7
  /**
package/types/Scan.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Represents an enemy scanned to the codex
3
+ * @module
4
+ */
1
5
  export default class Scan {
2
6
  constructor(scan: any);
3
7
  /**
package/types/Stats.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Player stats
2
+ * A player's overall career stats
3
+ * @module
3
4
  */
4
5
  export default class Stats {
5
6
  /**
@@ -1,11 +1,13 @@
1
1
  /**
2
- * Represents a player's progress with a Syndicate
2
+ * Represents a syndicate
3
+ * @module
3
4
  */
4
5
  export default class Syndicate {
5
6
  /**
6
7
  * @param {Object} affiliation The syndicate data
8
+ * @param {string} locale locale code
7
9
  */
8
- constructor(affiliation: any);
10
+ constructor(affiliation: any, locale: string);
9
11
  /**
10
12
  * Name of the syndicate
11
13
  * @type {String}
package/types/Util.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /** @module */
1
2
  /**
2
3
  * Map base10 int colors to hex color strings
3
4
  * @param {Record<string, number | undefined>} colors color map
package/types/Weapon.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Represents a player's used weapon stats
3
+ * @module
4
+ */
1
5
  export default class Weapon {
2
6
  constructor(weapon: any);
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A weapon skin
3
+ * @module
4
+ */
1
5
  export default class WeaponSkin {
2
6
  constructor(skin: any);
3
7
  /**
package/types/XpInfo.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * An item that has contributed to a player's mastery rank
3
+ * @module
4
+ */
1
5
  export default class XpInfo {
2
6
  constructor(info: any);
3
7
  /**