@wfcd/profile-parser 1.5.0 → 2.0.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.
Files changed (135) hide show
  1. package/dist/Ability-D1F1s_19.js +25 -0
  2. package/dist/Ability-DzKgEG5R.d.ts +19 -0
  3. package/dist/Ability.d.ts +2 -0
  4. package/dist/Ability.js +3 -0
  5. package/dist/ArchonCrystal.d.ts +23 -0
  6. package/dist/ArchonCrystal.js +29 -0
  7. package/dist/ChallengeProgress-B8Kv32oi.d.ts +20 -0
  8. package/dist/ChallengeProgress-DKKtijWw.js +26 -0
  9. package/dist/ChallengeProgress.d.ts +2 -0
  10. package/dist/ChallengeProgress.js +3 -0
  11. package/dist/Enemy-BqxhFdkB.js +44 -0
  12. package/dist/Enemy-toy1Spyi.d.ts +44 -0
  13. package/dist/Enemy.d.ts +2 -0
  14. package/dist/Enemy.js +3 -0
  15. package/dist/Intrinsics-CqFOpLxp.js +67 -0
  16. package/dist/Intrinsics-azrsOZJd.d.ts +67 -0
  17. package/dist/Intrinsics.d.ts +2 -0
  18. package/dist/Intrinsics.js +3 -0
  19. package/dist/ItemConfig-7as-gjPG.d.ts +51 -0
  20. package/dist/ItemConfig-uU36aJFJ.js +50 -0
  21. package/dist/ItemConfig.d.ts +4 -0
  22. package/dist/ItemConfig.js +5 -0
  23. package/dist/LoadOutInventory-BsPRtXfG.d.ts +53 -0
  24. package/dist/LoadOutInventory-CPVZJ_W5.js +52 -0
  25. package/dist/LoadOutInventory.d.ts +8 -0
  26. package/dist/LoadOutInventory.js +9 -0
  27. package/dist/LoadOutItem-B_6G9dXC.js +127 -0
  28. package/dist/LoadOutItem-BlRFZMNd.d.ts +120 -0
  29. package/dist/LoadOutItem.d.ts +6 -0
  30. package/dist/LoadOutItem.js +7 -0
  31. package/dist/LoadOutPreset-BshJF0LH.d.ts +83 -0
  32. package/dist/LoadOutPreset-CMbZo-II.js +83 -0
  33. package/dist/LoadOutPreset.d.ts +2 -0
  34. package/dist/LoadOutPreset.js +4 -0
  35. package/dist/Mission-BZgLMluh.d.ts +53 -0
  36. package/dist/Mission-D2n1i5R2.js +55 -0
  37. package/dist/Mission.d.ts +2 -0
  38. package/dist/Mission.js +3 -0
  39. package/dist/OperatorLoadOuts-B8bEy2dp.js +76 -0
  40. package/dist/OperatorLoadOuts-Dk2uMwby.d.ts +75 -0
  41. package/dist/OperatorLoadOuts.d.ts +4 -0
  42. package/dist/OperatorLoadOuts.js +5 -0
  43. package/dist/Polarity--RYq3iwF.js +28 -0
  44. package/dist/Polarity-DDWqEVm2.d.ts +26 -0
  45. package/dist/Polarity.d.ts +2 -0
  46. package/dist/Polarity.js +3 -0
  47. package/dist/Profile-WWZ2BDf0.js +193 -0
  48. package/dist/Profile-rva_Xss5.d.ts +212 -0
  49. package/dist/Profile.d.ts +15 -0
  50. package/dist/Profile.js +16 -0
  51. package/dist/ProfileParser.d.ts +71 -0
  52. package/dist/ProfileParser.js +71 -0
  53. package/dist/Pvp-Cb1KNKvw.d.ts +36 -0
  54. package/dist/Pvp-hyzYfVBB.js +36 -0
  55. package/dist/Pvp.d.ts +2 -0
  56. package/dist/Pvp.js +3 -0
  57. package/dist/Race-5Q0StEkE.js +35 -0
  58. package/dist/Race-DCxzjMpC.d.ts +32 -0
  59. package/dist/Race.d.ts +2 -0
  60. package/dist/Race.js +3 -0
  61. package/dist/Scan-BWfZiLoW.d.ts +27 -0
  62. package/dist/Scan-Dlrv6viG.js +27 -0
  63. package/dist/Scan.d.ts +2 -0
  64. package/dist/Scan.js +3 -0
  65. package/dist/Skin-BbUkegH1.d.ts +28 -0
  66. package/dist/Skin-D6v6jC9U.js +36 -0
  67. package/dist/Skin.d.ts +2 -0
  68. package/dist/Skin.js +4 -0
  69. package/dist/Stats-Bm1bpQe5.js +305 -0
  70. package/dist/Stats-DtkR2w1A.d.ts +325 -0
  71. package/dist/Stats.d.ts +9 -0
  72. package/dist/Stats.js +10 -0
  73. package/dist/Syndicate-CjUKKAsk.js +33 -0
  74. package/dist/Syndicate-FSUt1PP5.d.ts +33 -0
  75. package/dist/Syndicate.d.ts +2 -0
  76. package/dist/Syndicate.js +3 -0
  77. package/dist/Utils-C3kZCO6a.js +60 -0
  78. package/dist/Utils-C7BZqK4e.d.ts +37 -0
  79. package/dist/Utils.d.ts +2 -0
  80. package/dist/Utils.js +3 -0
  81. package/dist/Weapon-4KlXEHQF.js +64 -0
  82. package/dist/Weapon-DAJp-nbn.d.ts +32 -0
  83. package/dist/Weapon.d.ts +2 -0
  84. package/dist/Weapon.js +3 -0
  85. package/dist/XpInfo-CXC3I0NQ.js +35 -0
  86. package/dist/XpInfo-ChJ_lJaH.d.ts +34 -0
  87. package/dist/XpInfo.d.ts +2 -0
  88. package/dist/XpInfo.js +4 -0
  89. package/package.json +34 -32
  90. package/src/Ability.js +0 -22
  91. package/src/ArchonCrystal.js +0 -26
  92. package/src/ChallengeProgress.js +0 -23
  93. package/src/Enemy.js +0 -47
  94. package/src/Intrinsics.js +0 -77
  95. package/src/ItemConfig.js +0 -52
  96. package/src/LoadOutInventory.js +0 -53
  97. package/src/LoadOutItem.js +0 -155
  98. package/src/LoadOutPreset.js +0 -90
  99. package/src/Mission.js +0 -58
  100. package/src/OperatorLoadOuts.js +0 -77
  101. package/src/Polarity.js +0 -25
  102. package/src/Profile.js +0 -213
  103. package/src/ProfileParser.js +0 -50
  104. package/src/Pvp.js +0 -35
  105. package/src/Race.js +0 -33
  106. package/src/Scan.js +0 -22
  107. package/src/Skin.js +0 -33
  108. package/src/Stats.js +0 -340
  109. package/src/Syndicate.js +0 -34
  110. package/src/Utils.js +0 -66
  111. package/src/Weapon.js +0 -59
  112. package/src/XpInfo.js +0 -35
  113. package/types/Ability.d.ts +0 -20
  114. package/types/ArchonCrystal.d.ts +0 -22
  115. package/types/ChallengeProgress.d.ts +0 -21
  116. package/types/Enemy.d.ts +0 -41
  117. package/types/Intrinsics.d.ts +0 -66
  118. package/types/ItemConfig.d.ts +0 -21
  119. package/types/LoadOutInventory.d.ts +0 -45
  120. package/types/LoadOutItem.d.ts +0 -92
  121. package/types/LoadOutPreset.d.ts +0 -45
  122. package/types/Mission.d.ts +0 -35
  123. package/types/OperatorLoadOuts.d.ts +0 -35
  124. package/types/Polarity.d.ts +0 -21
  125. package/types/Profile.d.ts +0 -154
  126. package/types/ProfileParser.d.ts +0 -41
  127. package/types/Pvp.d.ts +0 -31
  128. package/types/Race.d.ts +0 -28
  129. package/types/Scan.d.ts +0 -20
  130. package/types/Skin.d.ts +0 -19
  131. package/types/Stats.d.ts +0 -255
  132. package/types/Syndicate.d.ts +0 -26
  133. package/types/Utils.d.ts +0 -3
  134. package/types/Weapon.d.ts +0 -51
  135. package/types/XpInfo.d.ts +0 -28
@@ -0,0 +1,325 @@
1
+ import { Ability, RawAbility } from "./Ability-DzKgEG5R.js";
2
+ import { Enemy, RawEnemy } from "./Enemy-toy1Spyi.js";
3
+ import { Mission, RawMission } from "./Mission-BZgLMluh.js";
4
+ import { Pvp, RawPvp } from "./Pvp-Cb1KNKvw.js";
5
+ import { Race, RawRace } from "./Race-DCxzjMpC.js";
6
+ import { RawScan, Scan } from "./Scan-BWfZiLoW.js";
7
+ import { RawWeapon, Weapon } from "./Weapon-DAJp-nbn.js";
8
+
9
+ //#region src/Stats.d.ts
10
+ interface RawStats {
11
+ GuildName: string;
12
+ MissionsCompleted: number;
13
+ MissionsQuit: number;
14
+ MissionsFailed: number;
15
+ MissionsInterrupted: number;
16
+ MissionsDumped: number;
17
+ PickupCount: number;
18
+ Weapons: RawWeapon[];
19
+ Enemies: RawEnemy[];
20
+ ExcavationEventScoreMax?: number;
21
+ ForestEventScoreMax?: number;
22
+ ForestEventScoreSum?: number;
23
+ MeleeKills: number;
24
+ Abilities: RawAbility[];
25
+ CiphersSolved: number;
26
+ CiphersFailed: number;
27
+ Income: number;
28
+ TimePlayedSec: number;
29
+ CipherTime: number;
30
+ Rating: number;
31
+ Rank: number;
32
+ Deaths: number;
33
+ PlayerLevel: number;
34
+ Missions: RawMission[];
35
+ HealCount: number;
36
+ HiveEventScore?: number;
37
+ HiveEventScoreSum?: number;
38
+ InvasionEventGrineerScore?: number;
39
+ InvasionEventCorpusScore?: number;
40
+ Scans: RawScan[];
41
+ ReviveCount: number;
42
+ FomorianEventScore?: number;
43
+ PVP?: RawPvp[];
44
+ PVPSpeedballTies?: number;
45
+ PVPSpeedballChecks?: number;
46
+ PVPSpeedballGoals?: number;
47
+ PVPSpeedballInterceptions?: number;
48
+ PVPSpeedballSteals?: number;
49
+ PVPSpeedballPoints?: number;
50
+ PVPSpeedballLosses?: number;
51
+ PVPSpeedballAssists?: number;
52
+ PVPSpeedballWins?: number;
53
+ PVPSpeedballSaves?: number;
54
+ PVPSpeedballPasses?: number;
55
+ DojoObstacleScore?: number;
56
+ PvpGamesPendingMask?: number;
57
+ DedicatedServerGamesCompleted?: number;
58
+ ColonistRescueEventScoreMax?: number;
59
+ AmbulasEventScoreMax?: number;
60
+ SentinelGameScore?: number;
61
+ AmalgamEventScoreMax?: number;
62
+ FlotillaEventScore?: number;
63
+ FlotillaGroundBadgesTier1?: number;
64
+ FlotillaGroundBadgesTier2?: number;
65
+ FlotillaGroundBadgesTier3?: number;
66
+ FlotillaSpaceBadgesTier1?: number;
67
+ FlotillaSpaceBadgesTier2?: number;
68
+ FlotillaSpaceBadgesTier3?: number;
69
+ MechSurvivalScoreMax: number;
70
+ ZephyrScore?: number;
71
+ Races: RawRace;
72
+ PortalEventScore?: number;
73
+ RiotMoaEventScore?: number;
74
+ RiotMoaEventScoreMax?: number;
75
+ ProjectSinisterEventScore?: number;
76
+ KelaEventBonusScoreMax?: number;
77
+ Halloween19ScoreMax?: number;
78
+ SurvivalEventScore?: number;
79
+ InfestedEventScore?: number;
80
+ }
81
+ interface Lunaro {
82
+ ties: number;
83
+ checks: number;
84
+ goals: number;
85
+ interceptions: number;
86
+ steals: number;
87
+ points: number;
88
+ losses: number;
89
+ assists: number;
90
+ wins: number;
91
+ saves: number;
92
+ passes: number;
93
+ }
94
+ interface ScarletSpear {
95
+ eventScore: number;
96
+ condrixTier1: number;
97
+ condrixTier2: number;
98
+ condrixTier3: number;
99
+ murexTier1: number;
100
+ murexTier2: number;
101
+ murexTier3: number;
102
+ }
103
+ /**
104
+ * A player's overall career stats
105
+ * @module
106
+ */
107
+ declare class Stats {
108
+ /**
109
+ * Guild name
110
+ */
111
+ guildName: string;
112
+ /**
113
+ * Missions completed
114
+ */
115
+ missionsCompleted: number;
116
+ /**
117
+ * Missions quit
118
+ */
119
+ missionsQuit: number;
120
+ /**
121
+ * Misions failed
122
+ */
123
+ missionsFailed: number;
124
+ /**
125
+ * Missions interrupted
126
+ */
127
+ missionsInterrupted: number;
128
+ /**
129
+ * Missions dumped
130
+ */
131
+ missionsDumped: number;
132
+ /**
133
+ * Items picked up
134
+ */
135
+ pickupCount: number;
136
+ /**
137
+ * Stats per weapon
138
+ */
139
+ weapons: Weapon[];
140
+ /**
141
+ * Stats on enemy encounters.
142
+ */
143
+ enemies: Enemy[];
144
+ /**
145
+ * Max score for Operation: Cryotic Front
146
+ */
147
+ excavationEventScoreMax?: number;
148
+ /**
149
+ * Max scoring for The Cicero crisis
150
+ */
151
+ forestEventScoreMax?: number;
152
+ /**
153
+ * Clan scoring for The Cicero crisis
154
+ */
155
+ forestEventScoreSum?: number;
156
+ /**
157
+ * Melee kills
158
+ */
159
+ meleeKills: number;
160
+ /**
161
+ * Used abilities
162
+ */
163
+ abilities: Ability[];
164
+ /**
165
+ * Ciphers completed successfully
166
+ */
167
+ ciphersSolved: number;
168
+ /**
169
+ * Ciphers failed
170
+ */
171
+ ciphersFailed: number;
172
+ /**
173
+ * Gross income
174
+ */
175
+ income: number;
176
+ /**
177
+ * Total play time since account creation
178
+ */
179
+ timePlayedSec: number;
180
+ /**
181
+ * Average time to hack a panel
182
+ */
183
+ cipherTime: number;
184
+ /**
185
+ * N/A
186
+ */
187
+ rating: number;
188
+ /**
189
+ * Mastery rank
190
+ */
191
+ rank: number;
192
+ /**
193
+ * Total deaths since account creation
194
+ */
195
+ deaths: number;
196
+ /**
197
+ * Mastery rank
198
+ */
199
+ playerLevel: number;
200
+ /**
201
+ * List of missions and high scores
202
+ */
203
+ missions: Mission[];
204
+ /**
205
+ * Team heals
206
+ */
207
+ healCount: number;
208
+ /**
209
+ * Event Scores for Operation breeding grounds
210
+ */
211
+ breedGrounds?: {
212
+ personalScore: number;
213
+ clanScore: number;
214
+ };
215
+ /**
216
+ * Event Scores for The Gradivus Dilemma
217
+ */
218
+ gradivusDilemma?: {
219
+ grineer: number;
220
+ corpus: number;
221
+ };
222
+ /**
223
+ * List of scanned Warframe objects
224
+ */
225
+ scans: Scan[];
226
+ /**
227
+ * Team revives
228
+ */
229
+ reviveCount: number;
230
+ /**
231
+ * Score for Operation: Eyes of Blight
232
+ */
233
+ fomorianEventScore?: number;
234
+ /**
235
+ * Conclave scores
236
+ */
237
+ pvp: Pvp[];
238
+ /**
239
+ * Lunaro stats
240
+ */
241
+ lunaro: Lunaro;
242
+ /**
243
+ * Dojo obstacle course goal
244
+ */
245
+ dojoObstacleScore: number;
246
+ /**
247
+ * N/A
248
+ */
249
+ pvpGamesPendingMask: number;
250
+ /**
251
+ * N/A
252
+ */
253
+ dedicatedServerGamesCompleted: number;
254
+ /**
255
+ * Event score for the Pacifism Defect
256
+ */
257
+ pacifismDefect?: number;
258
+ /**
259
+ * Score for operation Ambulas reborn.
260
+ */
261
+ ambulasReborn?: number;
262
+ /**
263
+ * Score for Wyrmius mini game
264
+ */
265
+ sentinelGameScore?: number;
266
+ /**
267
+ * Event score for operation hostile merger
268
+ */
269
+ amalgamEventScoreMax?: number;
270
+ /**
271
+ * Operation Scarlet spear event score and badges
272
+ */
273
+ scarletSpear?: ScarletSpear;
274
+ /**
275
+ * Operation: Orphix Venom score
276
+ */
277
+ orphixVenomScore?: number;
278
+ /**
279
+ * Play's Highest score in Happy Zephyr
280
+ */
281
+ happyZephyrScore: number;
282
+ /**
283
+ * K-Drive races
284
+ */
285
+ kDriveRaces: Race[];
286
+ /**
287
+ * Operation Gate Crash event
288
+ */
289
+ gateCrash?: number;
290
+ /**
291
+ * Per mission score for Operation: False Profit
292
+ */
293
+ falseProfitMissionScore?: number;
294
+ /**
295
+ * Total even score for Operation: False Profit
296
+ */
297
+ falseProfitEventScore?: number;
298
+ /**
299
+ * Operation: Shadow Debt event score
300
+ */
301
+ shadowDebtEventScore?: number;
302
+ /**
303
+ * Operation: Rathuum event score
304
+ */
305
+ rathuumEventScore?: number;
306
+ /**
307
+ * Hollowed flame event max score
308
+ */
309
+ hallowedFlameScoreMax?: number;
310
+ /**
311
+ * Survival Weekend event score
312
+ */
313
+ survivalWeekenedEventScore?: number;
314
+ /**
315
+ * N/A
316
+ */
317
+ infestedEventScore?: number;
318
+ /**
319
+ *
320
+ * @param stats Player stats
321
+ */
322
+ constructor(stats: RawStats);
323
+ }
324
+ //#endregion
325
+ export { RawStats, Stats };
@@ -0,0 +1,9 @@
1
+ import "./Ability-DzKgEG5R.js";
2
+ import "./Enemy-toy1Spyi.js";
3
+ import "./Mission-BZgLMluh.js";
4
+ import "./Pvp-Cb1KNKvw.js";
5
+ import "./Race-DCxzjMpC.js";
6
+ import "./Scan-BWfZiLoW.js";
7
+ import "./Weapon-DAJp-nbn.js";
8
+ import { RawStats, Stats } from "./Stats-DtkR2w1A.js";
9
+ export { RawStats, Stats as default };
package/dist/Stats.js ADDED
@@ -0,0 +1,10 @@
1
+ import "./Ability-D1F1s_19.js";
2
+ import "./Enemy-BqxhFdkB.js";
3
+ import "./Mission-D2n1i5R2.js";
4
+ import "./Pvp-hyzYfVBB.js";
5
+ import "./Race-5Q0StEkE.js";
6
+ import "./Scan-Dlrv6viG.js";
7
+ import "./Weapon-4KlXEHQF.js";
8
+ import { Stats } from "./Stats-Bm1bpQe5.js";
9
+
10
+ export { Stats as default };
@@ -0,0 +1,33 @@
1
+ import { syndicate } from "warframe-worldstate-data/utilities";
2
+
3
+ //#region src/Syndicate.ts
4
+ /**
5
+ * Represents a syndicate
6
+ * @module
7
+ */
8
+ var Syndicate = class {
9
+ /**
10
+ * Name of the syndicate
11
+ */
12
+ name;
13
+ /**
14
+ * Current standing the player has with the syndicate
15
+ */
16
+ standing;
17
+ /**
18
+ * The player's current syndicate title
19
+ */
20
+ title;
21
+ /**
22
+ * @param affiliation The syndicate data
23
+ * @param locale locale code
24
+ */
25
+ constructor(affiliation, locale = "en") {
26
+ this.name = syndicate(affiliation.Tag, locale);
27
+ this.standing = affiliation.Standing;
28
+ this.title = affiliation.Title;
29
+ }
30
+ };
31
+
32
+ //#endregion
33
+ export { Syndicate };
@@ -0,0 +1,33 @@
1
+ import { Locale } from "warframe-worldstate-data";
2
+
3
+ //#region src/Syndicate.d.ts
4
+ interface RawAffiliation {
5
+ Tag: string;
6
+ Standing: number;
7
+ Title: number;
8
+ }
9
+ /**
10
+ * Represents a syndicate
11
+ * @module
12
+ */
13
+ declare class Syndicate {
14
+ /**
15
+ * Name of the syndicate
16
+ */
17
+ name: string;
18
+ /**
19
+ * Current standing the player has with the syndicate
20
+ */
21
+ standing: number;
22
+ /**
23
+ * The player's current syndicate title
24
+ */
25
+ title: number;
26
+ /**
27
+ * @param affiliation The syndicate data
28
+ * @param locale locale code
29
+ */
30
+ constructor(affiliation: RawAffiliation, locale?: Locale);
31
+ }
32
+ //#endregion
33
+ export { RawAffiliation, Syndicate };
@@ -0,0 +1,2 @@
1
+ import { RawAffiliation, Syndicate } from "./Syndicate-FSUt1PP5.js";
2
+ export { RawAffiliation, Syndicate as default };
@@ -0,0 +1,3 @@
1
+ import { Syndicate } from "./Syndicate-CjUKKAsk.js";
2
+
3
+ export { Syndicate as default };
@@ -0,0 +1,60 @@
1
+ import Items from "@wfcd/items";
2
+
3
+ //#region src/Utils.ts
4
+ /**
5
+ * Map base10 int colors to hex color strings
6
+ * @param colors color map
7
+ */
8
+ const mapToHex = (colors) => {
9
+ const hex = {};
10
+ Object.entries(colors).forEach(([key, value]) => {
11
+ if (value) hex[key] = Math.abs(value).toString(16).toUpperCase();
12
+ });
13
+ return hex;
14
+ };
15
+ const categories = [
16
+ "Skins",
17
+ "Primary",
18
+ "Secondary",
19
+ "Melee",
20
+ "Arch-Melee",
21
+ "Arch-Gun",
22
+ "Warframes",
23
+ "Archwing",
24
+ "Sentinels",
25
+ "Pets"
26
+ ];
27
+ /**
28
+ * Find an item by Item#uniqueName
29
+ * @param name string with which to query
30
+ * @param locale locale to use for internationalization
31
+ * @returns {Item}
32
+ */
33
+ const find = (name, locale = "en") => {
34
+ const items = new Items({
35
+ category: categories,
36
+ i18n: [locale],
37
+ i18nOnObject: true
38
+ });
39
+ const item = items.find((i) => i.uniqueName === name);
40
+ let itemClone = { ...item };
41
+ if (locale !== "en" && itemClone.i18n[locale] && itemClone.i18n[locale]) {
42
+ itemClone = {
43
+ ...itemClone,
44
+ ...itemClone.i18n[locale]
45
+ };
46
+ if (itemClone.abilities) itemClone.abilities = itemClone.abilities.map((ability) => ({
47
+ uniqueName: ability.abilityUniqueName || ability.uniqueName || void 0,
48
+ name: ability.abilityName || ability.name,
49
+ description: ability.abilityDescription || ability.description,
50
+ imageName: ability.imageName ?? void 0
51
+ }));
52
+ delete itemClone.i18n;
53
+ return itemClone;
54
+ }
55
+ return item;
56
+ };
57
+ const numberToLetter = (num) => String.fromCharCode(64 + (num + 1));
58
+
59
+ //#endregion
60
+ export { find, mapToHex, numberToLetter };
@@ -0,0 +1,37 @@
1
+ import { WorldStateDate } from "warframe-worldstate-data/utilities";
2
+ import { RawColors } from "@wfcd/items";
3
+
4
+ //#region src/Utils.d.ts
5
+
6
+ /**
7
+ * interface for DE's ID data
8
+ */
9
+ interface RawId {
10
+ $oid: string;
11
+ }
12
+ type RawDate = WorldStateDate;
13
+ interface ProfileRawColors {
14
+ t0?: number;
15
+ t1?: number;
16
+ t2?: number;
17
+ t3?: number;
18
+ m0?: number;
19
+ m1?: number;
20
+ en?: number;
21
+ e1?: number;
22
+ }
23
+ /**
24
+ * Map base10 int colors to hex color strings
25
+ * @param colors color map
26
+ */
27
+ declare const mapToHex: (colors: ProfileRawColors) => RawColors;
28
+ /**
29
+ * Find an item by Item#uniqueName
30
+ * @param name string with which to query
31
+ * @param locale locale to use for internationalization
32
+ * @returns {Item}
33
+ */
34
+ declare const find: (name: string, locale?: string) => any;
35
+ declare const numberToLetter: (num: number) => string;
36
+ //#endregion
37
+ export { ProfileRawColors, RawDate, RawId, find, mapToHex, numberToLetter };
@@ -0,0 +1,2 @@
1
+ import { ProfileRawColors, RawDate, RawId, find, mapToHex, numberToLetter } from "./Utils-C7BZqK4e.js";
2
+ export { ProfileRawColors, RawDate, RawId, find, mapToHex, numberToLetter };
package/dist/Utils.js ADDED
@@ -0,0 +1,3 @@
1
+ import { find, mapToHex, numberToLetter } from "./Utils-C3kZCO6a.js";
2
+
3
+ export { find, mapToHex, numberToLetter };
@@ -0,0 +1,64 @@
1
+ //#region src/Weapon.ts
2
+ /**
3
+ * Represents a player's used weapon stats
4
+ * @module
5
+ */
6
+ var Weapon = class {
7
+ uniqueName;
8
+ xp;
9
+ equipTime;
10
+ headShots;
11
+ hits;
12
+ assists;
13
+ kills;
14
+ fired;
15
+ /**
16
+ *
17
+ * @param weapon The weapon stats being parsed
18
+ */
19
+ constructor(weapon) {
20
+ /**
21
+ * Weapon unique name
22
+ * @type {String}
23
+ */
24
+ this.uniqueName = weapon.type;
25
+ /**
26
+ * Earned XP with weapon
27
+ * @type {number}
28
+ */
29
+ this.xp = weapon.xp;
30
+ /**
31
+ * Time using this weapon
32
+ * @type {number}
33
+ */
34
+ this.equipTime = weapon.equipTime;
35
+ /**
36
+ * Headshots using this weapon
37
+ * @type {number}
38
+ */
39
+ this.headShots = weapon.headShots;
40
+ /**
41
+ * Hits using weapon
42
+ * @type {number}
43
+ */
44
+ this.hits = weapon.hits;
45
+ /**
46
+ * Assists using weapon
47
+ * @type {number}
48
+ */
49
+ this.assists = weapon.assists;
50
+ /**
51
+ * Kills with weapon
52
+ * @type {number}
53
+ */
54
+ this.kills = weapon.kills;
55
+ /**
56
+ * Shots fired
57
+ * @type {number}
58
+ */
59
+ this.fired = weapon.fired;
60
+ }
61
+ };
62
+
63
+ //#endregion
64
+ export { Weapon };
@@ -0,0 +1,32 @@
1
+ //#region src/Weapon.d.ts
2
+ interface RawWeapon {
3
+ type: string;
4
+ xp: number;
5
+ equipTime: number;
6
+ headShots: number;
7
+ hits: number;
8
+ assists: number;
9
+ kills: number;
10
+ fired: number;
11
+ }
12
+ /**
13
+ * Represents a player's used weapon stats
14
+ * @module
15
+ */
16
+ declare class Weapon {
17
+ uniqueName: string;
18
+ xp: number;
19
+ equipTime: number;
20
+ headShots: number;
21
+ hits: number;
22
+ assists: number;
23
+ kills: number;
24
+ fired: number;
25
+ /**
26
+ *
27
+ * @param weapon The weapon stats being parsed
28
+ */
29
+ constructor(weapon: RawWeapon);
30
+ }
31
+ //#endregion
32
+ export { RawWeapon, Weapon };
@@ -0,0 +1,2 @@
1
+ import { RawWeapon, Weapon } from "./Weapon-DAJp-nbn.js";
2
+ export { RawWeapon, Weapon as default };
package/dist/Weapon.js ADDED
@@ -0,0 +1,3 @@
1
+ import { Weapon } from "./Weapon-4KlXEHQF.js";
2
+
3
+ export { Weapon as default };
@@ -0,0 +1,35 @@
1
+ import { find } from "./Utils-C3kZCO6a.js";
2
+
3
+ //#region src/XpInfo.ts
4
+ /**
5
+ * An item that has contributed to a player's mastery rank
6
+ * @module
7
+ */
8
+ var XpInfo = class {
9
+ /**
10
+ * Unique name
11
+ */
12
+ uniqueName;
13
+ /**
14
+ * XP earned
15
+ */
16
+ xp;
17
+ /**
18
+ * The item corrosponding to the unique name.
19
+ */
20
+ item;
21
+ /**
22
+ *
23
+ * @param info The info for a given ranked item
24
+ * @param locale langauge to return item in
25
+ * @param withItem Whether or not to include items
26
+ */
27
+ constructor(info, locale = "en", withItem = false) {
28
+ this.uniqueName = info.ItemType;
29
+ this.xp = info.XP;
30
+ if (withItem) this.item = find(info.ItemType, locale);
31
+ }
32
+ };
33
+
34
+ //#endregion
35
+ export { XpInfo };
@@ -0,0 +1,34 @@
1
+ import { Item } from "@wfcd/items";
2
+
3
+ //#region src/XpInfo.d.ts
4
+ interface RawXpItem {
5
+ ItemType: string;
6
+ XP: number;
7
+ }
8
+ /**
9
+ * An item that has contributed to a player's mastery rank
10
+ * @module
11
+ */
12
+ declare class XpInfo {
13
+ /**
14
+ * Unique name
15
+ */
16
+ uniqueName: string;
17
+ /**
18
+ * XP earned
19
+ */
20
+ xp: number;
21
+ /**
22
+ * The item corrosponding to the unique name.
23
+ */
24
+ item?: Item;
25
+ /**
26
+ *
27
+ * @param info The info for a given ranked item
28
+ * @param locale langauge to return item in
29
+ * @param withItem Whether or not to include items
30
+ */
31
+ constructor(info: RawXpItem, locale?: string, withItem?: boolean);
32
+ }
33
+ //#endregion
34
+ export { RawXpItem, XpInfo };
@@ -0,0 +1,2 @@
1
+ import { RawXpItem, XpInfo } from "./XpInfo-ChJ_lJaH.js";
2
+ export { RawXpItem, XpInfo as default };