@wfcd/profile-parser 2.0.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 (100) 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/{src/Enemy.ts → dist/Enemy-toy1Spyi.d.ts} +6 -17
  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/{src/Intrinsics.ts → dist/Intrinsics-azrsOZJd.d.ts} +6 -37
  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/{src/LoadOutInventory.ts → dist/LoadOutInventory-BsPRtXfG.d.ts} +10 -26
  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/{src/LoadOutPreset.ts → dist/LoadOutPreset-BshJF0LH.d.ts} +11 -50
  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/{src/Mission.ts → dist/Mission-BZgLMluh.d.ts} +7 -29
  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/{src/Profile.ts → dist/Profile-rva_Xss5.d.ts} +27 -123
  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/{src/Pvp.ts → dist/Pvp-Cb1KNKvw.d.ts} +6 -13
  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/{src/Race.ts → dist/Race-DCxzjMpC.d.ts} +9 -13
  59. package/dist/Race.d.ts +2 -0
  60. package/dist/Race.js +3 -0
  61. package/{src/Scan.ts → dist/Scan-BWfZiLoW.d.ts} +6 -9
  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/{src/Stats.ts → dist/Stats-DtkR2w1A.d.ts} +22 -201
  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/{src/Syndicate.ts → dist/Syndicate-FSUt1PP5.d.ts} +7 -13
  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/{src/XpInfo.ts → dist/XpInfo-ChJ_lJaH.d.ts} +7 -14
  87. package/dist/XpInfo.d.ts +2 -0
  88. package/dist/XpInfo.js +4 -0
  89. package/package.json +2 -2
  90. package/src/Ability.ts +0 -29
  91. package/src/ArchonCrystal.ts +0 -33
  92. package/src/ChallengeProgress.ts +0 -30
  93. package/src/ItemConfig.ts +0 -71
  94. package/src/LoadOutItem.ts +0 -194
  95. package/src/OperatorLoadOuts.ts +0 -108
  96. package/src/Polarity.ts +0 -31
  97. package/src/ProfileParser.ts +0 -66
  98. package/src/Skin.ts +0 -41
  99. package/src/Utils.ts +0 -85
  100. package/src/Weapon.ts +0 -79
@@ -1,12 +1,13 @@
1
- import Ability, { type RawAbility } from './Ability';
2
- import Enemy, { type RawEnemy } from './Enemy';
3
- import Mission, { type RawMission } from './Mission';
4
- import Pvp, { type RawPvp } from './Pvp';
5
- import Race, { type RawRace } from './Race';
6
- import Scan, { type RawScan } from './Scan';
7
- import Weapon, { type RawWeapon } from './Weapon';
8
-
9
- export interface RawStats {
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 {
10
11
  GuildName: string;
11
12
  MissionsCompleted: number;
12
13
  MissionsQuit: number;
@@ -77,7 +78,6 @@ export interface RawStats {
77
78
  SurvivalEventScore?: number;
78
79
  InfestedEventScore?: number;
79
80
  }
80
-
81
81
  interface Lunaro {
82
82
  ties: number;
83
83
  checks: number;
@@ -91,7 +91,6 @@ interface Lunaro {
91
91
  saves: number;
92
92
  passes: number;
93
93
  }
94
-
95
94
  interface ScarletSpear {
96
95
  eventScore: number;
97
96
  condrixTier1: number;
@@ -101,404 +100,226 @@ interface ScarletSpear {
101
100
  murexTier2: number;
102
101
  murexTier3: number;
103
102
  }
104
-
105
103
  /**
106
104
  * A player's overall career stats
107
105
  * @module
108
106
  */
109
- export default class Stats {
107
+ declare class Stats {
110
108
  /**
111
109
  * Guild name
112
110
  */
113
111
  guildName: string;
114
-
115
112
  /**
116
113
  * Missions completed
117
114
  */
118
115
  missionsCompleted: number;
119
-
120
116
  /**
121
117
  * Missions quit
122
118
  */
123
119
  missionsQuit: number;
124
-
125
120
  /**
126
121
  * Misions failed
127
122
  */
128
123
  missionsFailed: number;
129
-
130
124
  /**
131
125
  * Missions interrupted
132
126
  */
133
127
  missionsInterrupted: number;
134
-
135
128
  /**
136
129
  * Missions dumped
137
130
  */
138
131
  missionsDumped: number;
139
-
140
132
  /**
141
133
  * Items picked up
142
134
  */
143
135
  pickupCount: number;
144
-
145
136
  /**
146
137
  * Stats per weapon
147
138
  */
148
139
  weapons: Weapon[];
149
-
150
140
  /**
151
141
  * Stats on enemy encounters.
152
142
  */
153
143
  enemies: Enemy[];
154
-
155
144
  /**
156
145
  * Max score for Operation: Cryotic Front
157
146
  */
158
147
  excavationEventScoreMax?: number;
159
-
160
148
  /**
161
149
  * Max scoring for The Cicero crisis
162
150
  */
163
151
  forestEventScoreMax?: number;
164
-
165
152
  /**
166
153
  * Clan scoring for The Cicero crisis
167
154
  */
168
155
  forestEventScoreSum?: number;
169
-
170
156
  /**
171
157
  * Melee kills
172
158
  */
173
159
  meleeKills: number;
174
-
175
160
  /**
176
161
  * Used abilities
177
162
  */
178
163
  abilities: Ability[];
179
-
180
164
  /**
181
165
  * Ciphers completed successfully
182
166
  */
183
167
  ciphersSolved: number;
184
-
185
168
  /**
186
169
  * Ciphers failed
187
170
  */
188
171
  ciphersFailed: number;
189
-
190
172
  /**
191
173
  * Gross income
192
174
  */
193
175
  income: number;
194
-
195
176
  /**
196
177
  * Total play time since account creation
197
178
  */
198
179
  timePlayedSec: number;
199
-
200
180
  /**
201
181
  * Average time to hack a panel
202
182
  */
203
183
  cipherTime: number;
204
-
205
184
  /**
206
185
  * N/A
207
186
  */
208
187
  rating: number;
209
-
210
188
  /**
211
189
  * Mastery rank
212
190
  */
213
191
  rank: number;
214
-
215
192
  /**
216
193
  * Total deaths since account creation
217
194
  */
218
195
  deaths: number;
219
-
220
196
  /**
221
197
  * Mastery rank
222
198
  */
223
199
  playerLevel: number;
224
-
225
200
  /**
226
201
  * List of missions and high scores
227
202
  */
228
203
  missions: Mission[];
229
-
230
204
  /**
231
205
  * Team heals
232
206
  */
233
207
  healCount: number;
234
-
235
208
  /**
236
209
  * Event Scores for Operation breeding grounds
237
210
  */
238
- breedGrounds?: { personalScore: number; clanScore: number };
239
-
211
+ breedGrounds?: {
212
+ personalScore: number;
213
+ clanScore: number;
214
+ };
240
215
  /**
241
216
  * Event Scores for The Gradivus Dilemma
242
217
  */
243
- gradivusDilemma?: { grineer: number; corpus: number };
244
-
218
+ gradivusDilemma?: {
219
+ grineer: number;
220
+ corpus: number;
221
+ };
245
222
  /**
246
223
  * List of scanned Warframe objects
247
224
  */
248
225
  scans: Scan[];
249
-
250
226
  /**
251
227
  * Team revives
252
228
  */
253
229
  reviveCount: number;
254
-
255
230
  /**
256
231
  * Score for Operation: Eyes of Blight
257
232
  */
258
233
  fomorianEventScore?: number;
259
-
260
234
  /**
261
235
  * Conclave scores
262
236
  */
263
237
  pvp: Pvp[];
264
-
265
238
  /**
266
239
  * Lunaro stats
267
240
  */
268
241
  lunaro: Lunaro;
269
-
270
242
  /**
271
243
  * Dojo obstacle course goal
272
244
  */
273
245
  dojoObstacleScore: number;
274
-
275
246
  /**
276
247
  * N/A
277
248
  */
278
249
  pvpGamesPendingMask: number;
279
-
280
250
  /**
281
251
  * N/A
282
252
  */
283
253
  dedicatedServerGamesCompleted: number;
284
-
285
254
  /**
286
255
  * Event score for the Pacifism Defect
287
256
  */
288
257
  pacifismDefect?: number;
289
-
290
258
  /**
291
259
  * Score for operation Ambulas reborn.
292
260
  */
293
261
  ambulasReborn?: number;
294
-
295
262
  /**
296
263
  * Score for Wyrmius mini game
297
264
  */
298
265
  sentinelGameScore?: number;
299
-
300
266
  /**
301
267
  * Event score for operation hostile merger
302
268
  */
303
269
  amalgamEventScoreMax?: number;
304
-
305
270
  /**
306
271
  * Operation Scarlet spear event score and badges
307
272
  */
308
273
  scarletSpear?: ScarletSpear;
309
-
310
274
  /**
311
275
  * Operation: Orphix Venom score
312
276
  */
313
277
  orphixVenomScore?: number;
314
-
315
278
  /**
316
279
  * Play's Highest score in Happy Zephyr
317
280
  */
318
281
  happyZephyrScore: number;
319
-
320
282
  /**
321
283
  * K-Drive races
322
284
  */
323
285
  kDriveRaces: Race[];
324
-
325
286
  /**
326
287
  * Operation Gate Crash event
327
288
  */
328
289
  gateCrash?: number;
329
-
330
290
  /**
331
291
  * Per mission score for Operation: False Profit
332
292
  */
333
293
  falseProfitMissionScore?: number;
334
-
335
294
  /**
336
295
  * Total even score for Operation: False Profit
337
296
  */
338
297
  falseProfitEventScore?: number;
339
-
340
298
  /**
341
299
  * Operation: Shadow Debt event score
342
300
  */
343
301
  shadowDebtEventScore?: number;
344
-
345
302
  /**
346
303
  * Operation: Rathuum event score
347
304
  */
348
305
  rathuumEventScore?: number;
349
-
350
306
  /**
351
307
  * Hollowed flame event max score
352
308
  */
353
309
  hallowedFlameScoreMax?: number;
354
-
355
310
  /**
356
311
  * Survival Weekend event score
357
312
  */
358
313
  survivalWeekenedEventScore?: number;
359
-
360
314
  /**
361
315
  * N/A
362
316
  */
363
317
  infestedEventScore?: number;
364
-
365
318
  /**
366
319
  *
367
320
  * @param stats Player stats
368
321
  */
369
- constructor(stats: RawStats) {
370
- this.guildName = stats.GuildName;
371
-
372
- this.missionsCompleted = stats.MissionsCompleted;
373
-
374
- this.missionsQuit = stats.MissionsQuit;
375
-
376
- this.missionsFailed = stats.MissionsFailed;
377
-
378
- this.missionsInterrupted = stats.MissionsInterrupted;
379
-
380
- this.missionsDumped = stats.MissionsDumped;
381
-
382
- this.pickupCount = stats.PickupCount;
383
-
384
- this.weapons = stats.Weapons.map((w) => new Weapon(w));
385
-
386
- this.enemies = stats.Enemies.map((e) => new Enemy(e));
387
-
388
- if (stats.ExcavationEventScoreMax) this.excavationEventScoreMax = stats.ExcavationEventScoreMax;
389
-
390
- if (stats.ForestEventScoreMax) this.forestEventScoreMax = stats.ForestEventScoreMax;
391
-
392
- if (stats.ForestEventScoreSum) this.forestEventScoreSum = stats.ForestEventScoreSum;
393
-
394
- this.meleeKills = stats.MeleeKills;
395
-
396
- this.abilities = stats.Abilities.map((a) => new Ability(a));
397
-
398
- this.ciphersSolved = stats.CiphersSolved;
399
-
400
- this.ciphersFailed = stats.CiphersFailed;
401
-
402
- this.income = stats.Income;
403
-
404
- this.timePlayedSec = stats.TimePlayedSec;
405
-
406
- this.cipherTime = stats.CipherTime;
407
-
408
- this.rating = stats.Rating;
409
-
410
- this.rank = stats.Rank;
411
-
412
- this.deaths = stats.Deaths;
413
-
414
- this.playerLevel = stats.PlayerLevel;
415
-
416
- this.missions = stats.Missions.map((m) => new Mission(m));
417
-
418
- this.healCount = stats.HealCount;
419
-
420
- if (stats.HiveEventScore || stats.HiveEventScoreSum) {
421
- this.breedGrounds = {
422
- personalScore: stats.HiveEventScore!,
423
- clanScore: stats.HiveEventScoreSum!,
424
- };
425
- }
426
-
427
- if (stats.InvasionEventGrineerScore || stats.InvasionEventCorpusScore) {
428
- this.gradivusDilemma = {
429
- grineer: stats.InvasionEventGrineerScore!,
430
- corpus: stats.InvasionEventCorpusScore!,
431
- };
432
- }
433
-
434
- this.scans = stats.Scans?.map((s) => new Scan(s)) ?? [];
435
-
436
- this.reviveCount = stats.ReviveCount;
437
-
438
- if (stats.FomorianEventScore) this.fomorianEventScore = stats.FomorianEventScore;
439
-
440
- this.pvp = stats.PVP?.map((pvp) => new Pvp(pvp)) ?? [];
441
-
442
- this.lunaro = {
443
- ties: stats.PVPSpeedballTies ?? 0,
444
- checks: stats.PVPSpeedballChecks ?? 0,
445
- goals: stats.PVPSpeedballGoals ?? 0,
446
- interceptions: stats.PVPSpeedballInterceptions ?? 0,
447
- steals: stats.PVPSpeedballSteals ?? 0,
448
- points: stats.PVPSpeedballPoints ?? 0,
449
- losses: stats.PVPSpeedballLosses ?? 0,
450
- assists: stats.PVPSpeedballAssists ?? 0,
451
- wins: stats.PVPSpeedballWins ?? 0,
452
- saves: stats.PVPSpeedballSaves ?? 0,
453
- passes: stats.PVPSpeedballPasses ?? 0,
454
- };
455
-
456
- this.dojoObstacleScore = stats.DojoObstacleScore ?? 0;
457
-
458
- this.pvpGamesPendingMask = stats.PvpGamesPendingMask ?? 0;
459
-
460
- this.dedicatedServerGamesCompleted = stats.DedicatedServerGamesCompleted ?? 0;
461
-
462
- if (stats.ColonistRescueEventScoreMax) this.pacifismDefect = stats.ColonistRescueEventScoreMax;
463
-
464
- if (stats.AmbulasEventScoreMax) this.ambulasReborn = stats.AmbulasEventScoreMax;
465
-
466
- if (stats.SentinelGameScore) this.sentinelGameScore = stats.SentinelGameScore;
467
-
468
- if (stats.AmalgamEventScoreMax) this.amalgamEventScoreMax = stats.AmalgamEventScoreMax;
469
-
470
- if (stats.FlotillaEventScore) {
471
- this.scarletSpear = {
472
- eventScore: stats.FlotillaEventScore,
473
- condrixTier1: stats.FlotillaGroundBadgesTier1!,
474
- condrixTier2: stats.FlotillaGroundBadgesTier2!,
475
- condrixTier3: stats.FlotillaGroundBadgesTier3!,
476
- murexTier1: stats.FlotillaSpaceBadgesTier1!,
477
- murexTier2: stats.FlotillaSpaceBadgesTier2!,
478
- murexTier3: stats.FlotillaSpaceBadgesTier3!,
479
- };
480
- }
481
-
482
- if (stats.MechSurvivalScoreMax) this.orphixVenomScore = stats.MechSurvivalScoreMax;
483
-
484
- this.happyZephyrScore = stats.ZephyrScore ?? 0;
485
-
486
- this.kDriveRaces = Race.fromRaceObject(stats.Races);
487
-
488
- if (stats.PortalEventScore) this.gateCrash = stats.PortalEventScore;
489
-
490
- if (stats.RiotMoaEventScore) this.falseProfitMissionScore = stats.RiotMoaEventScore;
491
-
492
- if (stats.RiotMoaEventScoreMax) this.falseProfitEventScore = stats.RiotMoaEventScoreMax;
493
-
494
- if (stats.ProjectSinisterEventScore) this.shadowDebtEventScore = stats.ProjectSinisterEventScore;
495
-
496
- if (stats.KelaEventBonusScoreMax) this.rathuumEventScore = stats.KelaEventBonusScoreMax;
497
-
498
- if (stats.Halloween19ScoreMax) this.hallowedFlameScoreMax = stats.Halloween19ScoreMax;
499
-
500
- if (stats.SurvivalEventScore) this.survivalWeekenedEventScore = stats.SurvivalEventScore;
501
-
502
- if (stats.InfestedEventScore) this.infestedEventScore = stats.InfestedEventScore;
503
- }
322
+ constructor(stats: RawStats);
504
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 };
@@ -1,39 +1,33 @@
1
- import { Locale } from 'warframe-worldstate-data';
2
- import { syndicate } from 'warframe-worldstate-data/utilities';
1
+ import { Locale } from "warframe-worldstate-data";
3
2
 
4
- export interface RawAffiliation {
3
+ //#region src/Syndicate.d.ts
4
+ interface RawAffiliation {
5
5
  Tag: string;
6
6
  Standing: number;
7
7
  Title: number;
8
8
  }
9
-
10
9
  /**
11
10
  * Represents a syndicate
12
11
  * @module
13
12
  */
14
- export default class Syndicate {
13
+ declare class Syndicate {
15
14
  /**
16
15
  * Name of the syndicate
17
16
  */
18
17
  name: string;
19
-
20
18
  /**
21
19
  * Current standing the player has with the syndicate
22
20
  */
23
21
  standing: number;
24
-
25
22
  /**
26
23
  * The player's current syndicate title
27
24
  */
28
25
  title: number;
29
-
30
26
  /**
31
27
  * @param affiliation The syndicate data
32
28
  * @param locale locale code
33
29
  */
34
- constructor(affiliation: RawAffiliation, locale: Locale = 'en') {
35
- this.name = syndicate(affiliation.Tag, locale);
36
- this.standing = affiliation.Standing;
37
- this.title = affiliation.Title;
38
- }
30
+ constructor(affiliation: RawAffiliation, locale?: Locale);
39
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 };