@wfcd/profile-parser 1.4.1 → 2.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.
Files changed (65) hide show
  1. package/package.json +33 -82
  2. package/src/{Ability.js → Ability.ts} +11 -4
  3. package/src/{ArchonCrystal.js → ArchonCrystal.ts} +12 -5
  4. package/src/{ChallengeProgress.js → ChallengeProgress.ts} +11 -4
  5. package/src/Enemy.ts +55 -0
  6. package/src/Intrinsics.ts +98 -0
  7. package/src/ItemConfig.ts +71 -0
  8. package/src/LoadOutInventory.ts +69 -0
  9. package/src/LoadOutItem.ts +194 -0
  10. package/src/LoadOutPreset.ts +122 -0
  11. package/src/Mission.ts +75 -0
  12. package/src/OperatorLoadOuts.ts +108 -0
  13. package/src/Polarity.ts +31 -0
  14. package/src/Profile.ts +308 -0
  15. package/src/ProfileParser.ts +66 -0
  16. package/src/Pvp.ts +43 -0
  17. package/src/Race.ts +36 -0
  18. package/src/Scan.ts +30 -0
  19. package/src/{Skin.js → Skin.ts} +14 -6
  20. package/src/Stats.ts +504 -0
  21. package/src/Syndicate.ts +39 -0
  22. package/src/Utils.ts +85 -0
  23. package/src/{Weapon.js → Weapon.ts} +23 -3
  24. package/src/XpInfo.ts +41 -0
  25. package/src/Enemy.js +0 -47
  26. package/src/Intrinsics.js +0 -77
  27. package/src/ItemConfig.js +0 -52
  28. package/src/LoadOutInventory.js +0 -53
  29. package/src/LoadOutItem.js +0 -155
  30. package/src/LoadOutPreset.js +0 -90
  31. package/src/Mission.js +0 -58
  32. package/src/OperatorLoadOuts.js +0 -77
  33. package/src/Polarity.js +0 -25
  34. package/src/Profile.js +0 -213
  35. package/src/ProfileParser.js +0 -50
  36. package/src/Pvp.js +0 -35
  37. package/src/Race.js +0 -33
  38. package/src/Scan.js +0 -22
  39. package/src/Stats.js +0 -340
  40. package/src/Syndicate.js +0 -34
  41. package/src/Utils.js +0 -66
  42. package/src/XpInfo.js +0 -35
  43. package/types/Ability.d.ts +0 -20
  44. package/types/ArchonCrystal.d.ts +0 -22
  45. package/types/ChallengeProgress.d.ts +0 -21
  46. package/types/Enemy.d.ts +0 -41
  47. package/types/Intrinsics.d.ts +0 -66
  48. package/types/ItemConfig.d.ts +0 -21
  49. package/types/LoadOutInventory.d.ts +0 -45
  50. package/types/LoadOutItem.d.ts +0 -92
  51. package/types/LoadOutPreset.d.ts +0 -45
  52. package/types/Mission.d.ts +0 -35
  53. package/types/OperatorLoadOuts.d.ts +0 -35
  54. package/types/Polarity.d.ts +0 -21
  55. package/types/Profile.d.ts +0 -154
  56. package/types/ProfileParser.d.ts +0 -41
  57. package/types/Pvp.d.ts +0 -31
  58. package/types/Race.d.ts +0 -28
  59. package/types/Scan.d.ts +0 -20
  60. package/types/Skin.d.ts +0 -19
  61. package/types/Stats.d.ts +0 -255
  62. package/types/Syndicate.d.ts +0 -26
  63. package/types/Utils.d.ts +0 -3
  64. package/types/Weapon.d.ts +0 -51
  65. package/types/XpInfo.d.ts +0 -28
@@ -1,154 +0,0 @@
1
- /**
2
- * A player's profile
3
- * @module
4
- */
5
- export default class Profile {
6
- /**
7
- *
8
- * @param {Object} profile The profile data to parse
9
- * @param {string} locale The locale to return in where possible
10
- * @param {boolean} [withItem=false] Whether or not to include items
11
- */
12
- constructor(profile: any, locale?: string, withItem?: boolean);
13
- /**
14
- * Player's account ID
15
- * @type {String}
16
- */
17
- accountId: string;
18
- /**
19
- * In-game name
20
- * @type {String}
21
- */
22
- displayName: string;
23
- /**
24
- * List of usernames across supported platforms
25
- * @type {Array<String>}
26
- */
27
- platformNames: Array<string>;
28
- /**
29
- * Mastery rank
30
- * @type {String}
31
- */
32
- masteryRank: string;
33
- preset: LoadOutPreset;
34
- /**
35
- * Current loadout
36
- * @type {LoadOutInventory}
37
- */
38
- loadout: LoadOutInventory;
39
- /**
40
- * Railjack and drifter Intrinsics
41
- * @type {Intrinsics}
42
- */
43
- intrinsics: Intrinsics;
44
- /**
45
- * Nightwave challenges progress
46
- * @type {Array<ChallengeProgress>}
47
- */
48
- challengeProgress: Array<ChallengeProgress>;
49
- guildId: any;
50
- /**
51
- * Guild name
52
- * @type {String}
53
- */
54
- guildName: string;
55
- /**
56
- * Guild tier
57
- * @type {number}
58
- */
59
- guildTier: number;
60
- /**
61
- * Guild XP
62
- * @type {number}
63
- */
64
- guildXp: number;
65
- /**
66
- * Guild class
67
- * @type {String}
68
- */
69
- guildClass: string;
70
- /**
71
- * Guild emblem.
72
- * @type {String}
73
- */
74
- guildEmblem: string;
75
- allianceId: any;
76
- /**
77
- * Assassins currently asfter the player
78
- * @type {Array<String>}
79
- */
80
- deathMarks: Array<string>;
81
- /**
82
- * Whether or not the player is qualified as a target for Zanuka
83
- * @type {boolean}
84
- */
85
- harvestable: boolean;
86
- /**
87
- * Whether or not the player is qualified as a target for a syndicate death squad
88
- * @type {boolean}
89
- */
90
- deathSquadable: boolean;
91
- /**
92
- * Date the account was created
93
- * @type {Date}
94
- */
95
- created: Date;
96
- /**
97
- * Whether the user has migrated to console or not
98
- * @type {boolean}
99
- */
100
- migratedToConsole: boolean;
101
- /**
102
- * List of completed missions and their completions
103
- * @type {Mission}
104
- */
105
- missions: Mission;
106
- /**
107
- * Player standing and title across all syndicates
108
- * @type {Array<Syndicate>}
109
- */
110
- syndicates: Array<Syndicate>;
111
- /**
112
- * Daily standing per Syndicate
113
- *
114
- * Faction syndicates all share daily standing
115
- * @type {Map<String,number>}
116
- */
117
- dailyStanding: Map<string, number>;
118
- /**
119
- * Daily focus
120
- * @type {number}
121
- */
122
- dailyFocus: number;
123
- /**
124
- * Player wishlist for in-game market items
125
- */
126
- wishList: any;
127
- /**
128
- * Whether the player has unlocked their operator or not
129
- * @type {boolean}
130
- */
131
- unlockedOperator: boolean;
132
- /**
133
- * Whether the player has unlocked their alignment or not
134
- * @type {boolean}
135
- */
136
- unlockedAlignment: boolean;
137
- /**
138
- * Operator loadout
139
- * @type {OperatorLoadOuts | undefined}
140
- */
141
- operatorLoadouts: OperatorLoadOuts | undefined;
142
- /**
143
- * Player's alignment
144
- * @type {Map<String,number | undefined>}
145
- */
146
- alignment: Map<string, number | undefined>;
147
- }
148
- import LoadOutPreset from './LoadOutPreset.js';
149
- import LoadOutInventory from './LoadOutInventory.js';
150
- import Intrinsics from './Intrinsics.js';
151
- import ChallengeProgress from './ChallengeProgress.js';
152
- import Mission from './Mission.js';
153
- import Syndicate from './Syndicate.js';
154
- import OperatorLoadOuts from './OperatorLoadOuts.js';
@@ -1,41 +0,0 @@
1
- /**
2
- * Parser entry point
3
- * @module
4
- */
5
- export default class ProfileParser {
6
- /**
7
- *
8
- * @param {Object} data The data returned by getProfile endpoint
9
- * @param {string} locale The locale to return where possible
10
- * @param {boolean} [withItem=false] Whether or not to include items
11
- */
12
- constructor(data: any, locale?: string, withItem?: boolean);
13
- /**
14
- * Player's profile
15
- * @type {Profile}
16
- */
17
- profile: Profile;
18
- /**
19
- * @type {number}
20
- */
21
- techProjects: number;
22
- /**
23
- * @type {number}
24
- */
25
- xpComponents: number;
26
- /**
27
- * @type {number}
28
- */
29
- xpCacheExpiryDate: number;
30
- /**
31
- * @type {number}
32
- */
33
- ceremonyResetDate: number;
34
- /**
35
- * Player stats
36
- * @type {Stats}
37
- */
38
- stats: Stats;
39
- }
40
- import Profile from './Profile.js';
41
- import Stats from './Stats.js';
package/types/Pvp.d.ts DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * Player's conclave stats
3
- * @module
4
- */
5
- export default class Pvp {
6
- /**
7
- *
8
- * @param {Object} pvp PVP data to parse
9
- */
10
- constructor(pvp: any);
11
- /**
12
- * PVP match unique name
13
- * @type {String}
14
- */
15
- uniqueName: string;
16
- /**
17
- * Deaths for this match
18
- * @type {number | undefined}
19
- */
20
- suitDeaths: number | undefined;
21
- /**
22
- * Warframe kills
23
- * @type {number | undefined}
24
- */
25
- suitKills: number | undefined;
26
- /**
27
- * Weapon killes
28
- * @type {number | undefined}
29
- */
30
- weaponKills: number | undefined;
31
- }
package/types/Race.d.ts DELETED
@@ -1,28 +0,0 @@
1
- /**
2
- * Represents a k-drive race
3
- * @module
4
- */
5
- export default class Race {
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);
18
- /**
19
- * Race name
20
- * @type {String}
21
- */
22
- uniqueName: string;
23
- /**
24
- * Race High score
25
- * @type {number}
26
- */
27
- highScore: number;
28
- }
package/types/Scan.d.ts DELETED
@@ -1,20 +0,0 @@
1
- /**
2
- * Represents an enemy scanned to the codex
3
- * @module
4
- */
5
- export default class Scan {
6
- /**
7
- * @param {Object} scan The scanned Warframe object
8
- */
9
- constructor(scan: any);
10
- /**
11
- * Enemy unique name
12
- * @type {String}
13
- */
14
- uniqueName: string;
15
- /**
16
- * Number of scans done
17
- * @type {number}
18
- */
19
- scans: number;
20
- }
package/types/Skin.d.ts DELETED
@@ -1,19 +0,0 @@
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
- * @param {string} [locale='en'] The locale to return skin item in
10
- */
11
- constructor(skin: any, locale?: string);
12
- /**
13
- * Unique name
14
- * @type {String}
15
- */
16
- uniqueName: string;
17
- item: any;
18
- }
19
- export function WeaponSkin(skin: any): Skin;
package/types/Stats.d.ts DELETED
@@ -1,255 +0,0 @@
1
- /**
2
- * A player's overall career stats
3
- * @module
4
- */
5
- export default class Stats {
6
- /**
7
- *
8
- * @param {Object} stats Player stats
9
- */
10
- constructor(stats: any);
11
- /**
12
- * Guild name
13
- * @type {String}
14
- */
15
- guildName: string;
16
- /**
17
- * Player's total accumulated xp
18
- * @type {String}
19
- */
20
- xp: string;
21
- /**
22
- * Missions completed
23
- * @type {number}
24
- */
25
- missionsCompleted: number;
26
- /**
27
- * Missions quit
28
- * @type {number}
29
- */
30
- missionsQuit: number;
31
- /**
32
- * Misions failed
33
- * @type {number}
34
- */
35
- missionsFailed: number;
36
- /**
37
- * Missions interrupted
38
- * @type {number}
39
- */
40
- missionsInterrupted: number;
41
- /**
42
- * Missions dumped
43
- * @type {number}
44
- */
45
- missionsDumped: number;
46
- /**
47
- * Items picked up
48
- * @type {number}
49
- */
50
- pickupCount: number;
51
- /**
52
- * Stats per weapon
53
- * @type {Array<Weapon>}
54
- */
55
- weapons: Array<Weapon>;
56
- /**
57
- * Stats on enemy encounters.
58
- * @type {Array<Enemy>}
59
- */
60
- enemies: Array<Enemy>;
61
- /**
62
- * Max score for Operation: Cryotic Front
63
- * @type {number}
64
- */
65
- excavationEventScoreMax: number;
66
- /**
67
- * Max scoring for The Cicero crisis
68
- * @type {number}
69
- */
70
- forestEventScoreMax: number;
71
- /**
72
- * Clan scoring for The Cicero crisis
73
- * @type {number}
74
- */
75
- forestEventScoreSum: number;
76
- /**
77
- * Melee kills
78
- * @type {number}
79
- */
80
- meleeKills: number;
81
- /**
82
- * Used abilities
83
- * @type {number}
84
- */
85
- abilities: number;
86
- /**
87
- * Ciphers completed successfully
88
- * @type {number}
89
- */
90
- ciphersSolved: number;
91
- /**
92
- * Ciphers failed
93
- * @type {number}
94
- */
95
- ciphersFailed: number;
96
- /**
97
- * Gross income
98
- * @type {number}
99
- */
100
- income: number;
101
- /**
102
- * Total play time since account creation
103
- * @type {string}
104
- */
105
- timePlayedSec: string;
106
- /**
107
- * Average time to hack a panel
108
- * @type {number}
109
- */
110
- cipherTime: number;
111
- /**
112
- * @type {number}
113
- */
114
- rating: number;
115
- /**
116
- * Mastery rank
117
- * @type {number}
118
- */
119
- rank: number;
120
- /**
121
- * Total deaths since account creation
122
- * @type {number}
123
- */
124
- deaths: number;
125
- /**
126
- * Mastery rank
127
- * @type {number}
128
- */
129
- playerLevel: number;
130
- /**
131
- * List of missions and high scores
132
- * @type {Array<Mission>}
133
- */
134
- missions: Array<Mission>;
135
- /**
136
- * Team heals
137
- * @type {number}
138
- */
139
- healCount: number;
140
- /**
141
- * Event Scores for Operation breeding grounds
142
- * @type {Map<String,number>}
143
- */
144
- breedGrounds: Map<string, number>;
145
- /**
146
- * Event Scores for The Gradivus Dilemma
147
- * @type {Map<String,number>}
148
- */
149
- gradivusDilemma: Map<string, number>;
150
- /**
151
- * List of scanned Warframe objects
152
- * @type {Array<Scan>}
153
- */
154
- scans: Array<Scan>;
155
- /**
156
- * Team revives
157
- * @type {number}
158
- */
159
- reviveCount: number;
160
- /**
161
- * Score for Operation: Eyes of Blight
162
- */
163
- fomorianEventScore: any;
164
- pvp: any;
165
- /**
166
- * Lunaro stats
167
- * @type {Map<String,number>}
168
- */
169
- lunaro: Map<string, number>;
170
- /**
171
- * Dojo obstacle course goal
172
- * @type {number}
173
- */
174
- dojoObstacleScore: number;
175
- /**
176
- * @type {number}
177
- */
178
- pvpGamesPendingMask: number;
179
- /**
180
- * @type {number}
181
- */
182
- dedicatedServerGamesCompleted: number;
183
- /**
184
- * Event score for the Pacifism Defect
185
- * @type {number}
186
- */
187
- pacifismDefect: number;
188
- /**
189
- * Score for operation Ambulas reborn.
190
- * @type {number}
191
- */
192
- ambulasReborn: number;
193
- /**
194
- * Score for Wyrmius mini game
195
- * @type {number}
196
- */
197
- sentinelGameScore: number;
198
- /**
199
- * Event score for operation hostile merger
200
- * @type {number}
201
- */
202
- amalgamEventScoreMax: number;
203
- /**
204
- * Operation Scarlet spear event score and badges
205
- * @type {Map<String,number>}
206
- */
207
- scarletSpear: Map<string, number>;
208
- orphixVenomScore: any;
209
- happyZephyrScore: any;
210
- kDriveRaces: Race[];
211
- /**
212
- * Operation Gate Crash event
213
- * @type {number}
214
- */
215
- gateCrash: number;
216
- /**
217
- * Per mission score for Operation: False Profit
218
- * @type {number}
219
- */
220
- falseProfitMissionScore: number;
221
- /**
222
- * Total even score for Operation: False Profit
223
- * @type {number}
224
- */
225
- fasleProfitEventScore: number;
226
- /**
227
- * Operation: Shadow Debt event score
228
- * @type {number}
229
- */
230
- shadowDebtEventScore: number;
231
- /**
232
- * Operation: Rathuum event score
233
- * @type {number}
234
- */
235
- rathuumEventScore: number;
236
- /**
237
- * Hollowed flame event max score
238
- * @type {number}
239
- */
240
- hallowedFlameScoreMax: number;
241
- /**
242
- * Survival Weekend event score
243
- * @type {number}
244
- */
245
- survivalWeekenedEventScore: number;
246
- /**
247
- * @type {number}
248
- */
249
- infestedEventScore: number;
250
- }
251
- import Weapon from './Weapon.js';
252
- import Enemy from './Enemy.js';
253
- import Mission from './Mission.js';
254
- import Scan from './Scan.js';
255
- import Race from './Race.js';
@@ -1,26 +0,0 @@
1
- /**
2
- * Represents a syndicate
3
- * @module
4
- */
5
- export default class Syndicate {
6
- /**
7
- * @param {Object} affiliation The syndicate data
8
- * @param {string} locale locale code
9
- */
10
- constructor(affiliation: any, locale?: string);
11
- /**
12
- * Name of the syndicate
13
- * @type {String}
14
- */
15
- name: string;
16
- /**
17
- * Current standing the player has with the syndicate
18
- * @type {number}
19
- */
20
- standing: number;
21
- /**
22
- * The player's current syndicate title
23
- * @type {String}
24
- */
25
- title: string;
26
- }
package/types/Utils.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export function mapToHex(colors: Record<string, number | undefined>): Record<string, string>;
2
- export function find(name: string, locale?: string): Item;
3
- export function numberToLetter(num: any): string;
package/types/Weapon.d.ts DELETED
@@ -1,51 +0,0 @@
1
- /**
2
- * Represents a player's used weapon stats
3
- * @module
4
- */
5
- export default class Weapon {
6
- /**
7
- *
8
- * @param {Object} weapon The weapon stats being parsed
9
- */
10
- constructor(weapon: any);
11
- /**
12
- * Weapon unique name
13
- * @type {String}
14
- */
15
- uniqueName: string;
16
- /**
17
- * Earned XP with weapon
18
- * @type {number}
19
- */
20
- xp: number;
21
- /**
22
- * Time using this weapon
23
- * @type {number}
24
- */
25
- equiptime: number;
26
- /**
27
- * Headshots using this weapon
28
- * @type {number}
29
- */
30
- headShots: number;
31
- /**
32
- * Hits using weapon
33
- * @type {number}
34
- */
35
- hits: number;
36
- /**
37
- * Assists using weapon
38
- * @type {number}
39
- */
40
- assists: number;
41
- /**
42
- * Kills with weapon
43
- * @type {number}
44
- */
45
- kills: number;
46
- /**
47
- * Shots fired
48
- * @type {number}
49
- */
50
- fired: number;
51
- }
package/types/XpInfo.d.ts DELETED
@@ -1,28 +0,0 @@
1
- /**
2
- * An item that has contributed to a player's mastery rank
3
- * @module
4
- */
5
- export default class XpInfo {
6
- /**
7
- *
8
- * @param {Object} info The info for a given ranked item
9
- * @param {string} locale langauge to return item in
10
- * @param {boolean} [withItem=false] Whether or not to include items
11
- */
12
- constructor(info: any, locale?: string, withItem?: boolean);
13
- /**
14
- * Unique name
15
- * @type {String}
16
- */
17
- uniqueName: string;
18
- /**
19
- * XP earned
20
- * @type {number}
21
- */
22
- xp: number;
23
- /**
24
- * The item corrosponding to the unique name.
25
- * @type {module:"warframe-items".Item | undefined}
26
- */
27
- item: any;
28
- }