@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.
- package/dist/Ability-D1F1s_19.js +25 -0
- package/dist/Ability-DzKgEG5R.d.ts +19 -0
- package/dist/Ability.d.ts +2 -0
- package/dist/Ability.js +3 -0
- package/dist/ArchonCrystal.d.ts +23 -0
- package/dist/ArchonCrystal.js +29 -0
- package/dist/ChallengeProgress-B8Kv32oi.d.ts +20 -0
- package/dist/ChallengeProgress-DKKtijWw.js +26 -0
- package/dist/ChallengeProgress.d.ts +2 -0
- package/dist/ChallengeProgress.js +3 -0
- package/dist/Enemy-BqxhFdkB.js +44 -0
- package/{src/Enemy.ts → dist/Enemy-toy1Spyi.d.ts} +6 -17
- package/dist/Enemy.d.ts +2 -0
- package/dist/Enemy.js +3 -0
- package/dist/Intrinsics-CqFOpLxp.js +67 -0
- package/{src/Intrinsics.ts → dist/Intrinsics-azrsOZJd.d.ts} +6 -37
- package/dist/Intrinsics.d.ts +2 -0
- package/dist/Intrinsics.js +3 -0
- package/dist/ItemConfig-7as-gjPG.d.ts +51 -0
- package/dist/ItemConfig-uU36aJFJ.js +50 -0
- package/dist/ItemConfig.d.ts +4 -0
- package/dist/ItemConfig.js +5 -0
- package/{src/LoadOutInventory.ts → dist/LoadOutInventory-BsPRtXfG.d.ts} +10 -26
- package/dist/LoadOutInventory-CPVZJ_W5.js +52 -0
- package/dist/LoadOutInventory.d.ts +8 -0
- package/dist/LoadOutInventory.js +9 -0
- package/dist/LoadOutItem-B_6G9dXC.js +127 -0
- package/dist/LoadOutItem-BlRFZMNd.d.ts +120 -0
- package/dist/LoadOutItem.d.ts +6 -0
- package/dist/LoadOutItem.js +7 -0
- package/{src/LoadOutPreset.ts → dist/LoadOutPreset-BshJF0LH.d.ts} +11 -50
- package/dist/LoadOutPreset-CMbZo-II.js +83 -0
- package/dist/LoadOutPreset.d.ts +2 -0
- package/dist/LoadOutPreset.js +4 -0
- package/{src/Mission.ts → dist/Mission-BZgLMluh.d.ts} +7 -29
- package/dist/Mission-D2n1i5R2.js +55 -0
- package/dist/Mission.d.ts +2 -0
- package/dist/Mission.js +3 -0
- package/dist/OperatorLoadOuts-B8bEy2dp.js +76 -0
- package/dist/OperatorLoadOuts-Dk2uMwby.d.ts +75 -0
- package/dist/OperatorLoadOuts.d.ts +4 -0
- package/dist/OperatorLoadOuts.js +5 -0
- package/dist/Polarity--RYq3iwF.js +28 -0
- package/dist/Polarity-DDWqEVm2.d.ts +26 -0
- package/dist/Polarity.d.ts +2 -0
- package/dist/Polarity.js +3 -0
- package/dist/Profile-WWZ2BDf0.js +193 -0
- package/{src/Profile.ts → dist/Profile-rva_Xss5.d.ts} +27 -123
- package/dist/Profile.d.ts +15 -0
- package/dist/Profile.js +16 -0
- package/dist/ProfileParser.d.ts +71 -0
- package/dist/ProfileParser.js +71 -0
- package/{src/Pvp.ts → dist/Pvp-Cb1KNKvw.d.ts} +6 -13
- package/dist/Pvp-hyzYfVBB.js +36 -0
- package/dist/Pvp.d.ts +2 -0
- package/dist/Pvp.js +3 -0
- package/dist/Race-5Q0StEkE.js +35 -0
- package/{src/Race.ts → dist/Race-DCxzjMpC.d.ts} +9 -13
- package/dist/Race.d.ts +2 -0
- package/dist/Race.js +3 -0
- package/{src/Scan.ts → dist/Scan-BWfZiLoW.d.ts} +6 -9
- package/dist/Scan-Dlrv6viG.js +27 -0
- package/dist/Scan.d.ts +2 -0
- package/dist/Scan.js +3 -0
- package/dist/Skin-BbUkegH1.d.ts +28 -0
- package/dist/Skin-D6v6jC9U.js +36 -0
- package/dist/Skin.d.ts +2 -0
- package/dist/Skin.js +4 -0
- package/dist/Stats-Bm1bpQe5.js +305 -0
- package/{src/Stats.ts → dist/Stats-DtkR2w1A.d.ts} +22 -201
- package/dist/Stats.d.ts +9 -0
- package/dist/Stats.js +10 -0
- package/dist/Syndicate-CjUKKAsk.js +33 -0
- package/{src/Syndicate.ts → dist/Syndicate-FSUt1PP5.d.ts} +7 -13
- package/dist/Syndicate.d.ts +2 -0
- package/dist/Syndicate.js +3 -0
- package/dist/Utils-C3kZCO6a.js +60 -0
- package/dist/Utils-C7BZqK4e.d.ts +37 -0
- package/dist/Utils.d.ts +2 -0
- package/dist/Utils.js +3 -0
- package/dist/Weapon-4KlXEHQF.js +64 -0
- package/dist/Weapon-DAJp-nbn.d.ts +32 -0
- package/dist/Weapon.d.ts +2 -0
- package/dist/Weapon.js +3 -0
- package/dist/XpInfo-CXC3I0NQ.js +35 -0
- package/{src/XpInfo.ts → dist/XpInfo-ChJ_lJaH.d.ts} +7 -14
- package/dist/XpInfo.d.ts +2 -0
- package/dist/XpInfo.js +4 -0
- package/package.json +2 -2
- package/src/Ability.ts +0 -29
- package/src/ArchonCrystal.ts +0 -33
- package/src/ChallengeProgress.ts +0 -30
- package/src/ItemConfig.ts +0 -71
- package/src/LoadOutItem.ts +0 -194
- package/src/OperatorLoadOuts.ts +0 -108
- package/src/Polarity.ts +0 -31
- package/src/ProfileParser.ts +0 -66
- package/src/Skin.ts +0 -41
- package/src/Utils.ts +0 -85
- package/src/Weapon.ts +0 -79
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { mapToHex } from "./Utils-C3kZCO6a.js";
|
|
2
|
+
import { Skin } from "./Skin-D6v6jC9U.js";
|
|
3
|
+
import { colors } from "@wfcd/items/utilities";
|
|
4
|
+
|
|
5
|
+
//#region src/OperatorLoadOuts.ts
|
|
6
|
+
/**
|
|
7
|
+
* Player's operator loadout
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
var OperatorLoadOuts = class {
|
|
11
|
+
/**
|
|
12
|
+
* Skins that have been applied to the player's operator.
|
|
13
|
+
*/
|
|
14
|
+
skins;
|
|
15
|
+
/**
|
|
16
|
+
* Operator amp ID
|
|
17
|
+
*/
|
|
18
|
+
operatorAmp;
|
|
19
|
+
/**
|
|
20
|
+
* Applied upgrade IDs
|
|
21
|
+
*/
|
|
22
|
+
upgrades;
|
|
23
|
+
abilityOverride;
|
|
24
|
+
/**
|
|
25
|
+
* Operator primary colors
|
|
26
|
+
*/
|
|
27
|
+
primaryColor;
|
|
28
|
+
/**
|
|
29
|
+
* Operator sigil colors
|
|
30
|
+
*/
|
|
31
|
+
sigilColor;
|
|
32
|
+
/**
|
|
33
|
+
* Operator attachment colors
|
|
34
|
+
*/
|
|
35
|
+
attachmentsColor;
|
|
36
|
+
/**
|
|
37
|
+
* Operator syandana colors
|
|
38
|
+
*/
|
|
39
|
+
syandanaColor;
|
|
40
|
+
/**
|
|
41
|
+
* Operator eye colors
|
|
42
|
+
*/
|
|
43
|
+
eyeColor;
|
|
44
|
+
/**
|
|
45
|
+
* Operator facial colors
|
|
46
|
+
*/
|
|
47
|
+
facial;
|
|
48
|
+
/**
|
|
49
|
+
* Operator cloth colors
|
|
50
|
+
*/
|
|
51
|
+
cloth;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @param {Object} loadout The operator loadout
|
|
55
|
+
*/
|
|
56
|
+
constructor(loadout, locale = "en") {
|
|
57
|
+
this.skins = loadout.Skins.filter(Boolean).map((s) => new Skin({ ItemType: s }, locale));
|
|
58
|
+
this.operatorAmp = loadout.OperatorAmp?.$oid;
|
|
59
|
+
/**
|
|
60
|
+
* Applied upgrade IDs
|
|
61
|
+
* @type {Array<String>}
|
|
62
|
+
*/
|
|
63
|
+
this.upgrades = loadout.Upgrades;
|
|
64
|
+
this.abilityOverride = loadout.AbilityOverride;
|
|
65
|
+
if (loadout.pricol) this.primaryColor = colors.mapColors(mapToHex(loadout.pricol));
|
|
66
|
+
if (loadout.sigcol) this.sigilColor = colors.mapColors(mapToHex(loadout.sigcol));
|
|
67
|
+
if (loadout.attcol) this.attachmentsColor = colors.mapColors(mapToHex(loadout.attcol));
|
|
68
|
+
if (loadout.syancol) this.syandanaColor = colors.mapColors(mapToHex(loadout.syancol));
|
|
69
|
+
if (loadout.eyecol) this.eyeColor = colors.mapColors(mapToHex(loadout.eyecol));
|
|
70
|
+
if (loadout.facial) this.facial = colors.mapColors(mapToHex(loadout.facial));
|
|
71
|
+
if (loadout.cloth) this.cloth = colors.mapColors(mapToHex(loadout.cloth));
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
export { OperatorLoadOuts };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Skin } from "./Skin-BbUkegH1.js";
|
|
2
|
+
import { ProfileRawColors } from "./Utils-C7BZqK4e.js";
|
|
3
|
+
import { ColorMap } from "@wfcd/items";
|
|
4
|
+
import { Locale } from "warframe-worldstate-data";
|
|
5
|
+
|
|
6
|
+
//#region src/OperatorLoadOuts.d.ts
|
|
7
|
+
interface RawOperatorLoadOuts {
|
|
8
|
+
Skins: string[];
|
|
9
|
+
OperatorAmp?: {
|
|
10
|
+
$oid: string;
|
|
11
|
+
};
|
|
12
|
+
Upgrades: string[];
|
|
13
|
+
AbilityOverride: any;
|
|
14
|
+
pricol?: ProfileRawColors;
|
|
15
|
+
sigcol?: ProfileRawColors;
|
|
16
|
+
attcol?: ProfileRawColors;
|
|
17
|
+
syancol?: ProfileRawColors;
|
|
18
|
+
eyecol?: ProfileRawColors;
|
|
19
|
+
facial?: ProfileRawColors;
|
|
20
|
+
cloth?: ProfileRawColors;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Player's operator loadout
|
|
24
|
+
* @module
|
|
25
|
+
*/
|
|
26
|
+
declare class OperatorLoadOuts {
|
|
27
|
+
/**
|
|
28
|
+
* Skins that have been applied to the player's operator.
|
|
29
|
+
*/
|
|
30
|
+
skins: Skin[];
|
|
31
|
+
/**
|
|
32
|
+
* Operator amp ID
|
|
33
|
+
*/
|
|
34
|
+
operatorAmp?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Applied upgrade IDs
|
|
37
|
+
*/
|
|
38
|
+
upgrades: string[];
|
|
39
|
+
abilityOverride: any;
|
|
40
|
+
/**
|
|
41
|
+
* Operator primary colors
|
|
42
|
+
*/
|
|
43
|
+
primaryColor?: ColorMap;
|
|
44
|
+
/**
|
|
45
|
+
* Operator sigil colors
|
|
46
|
+
*/
|
|
47
|
+
sigilColor?: ColorMap;
|
|
48
|
+
/**
|
|
49
|
+
* Operator attachment colors
|
|
50
|
+
*/
|
|
51
|
+
attachmentsColor?: ColorMap;
|
|
52
|
+
/**
|
|
53
|
+
* Operator syandana colors
|
|
54
|
+
*/
|
|
55
|
+
syandanaColor?: ColorMap;
|
|
56
|
+
/**
|
|
57
|
+
* Operator eye colors
|
|
58
|
+
*/
|
|
59
|
+
eyeColor?: ColorMap;
|
|
60
|
+
/**
|
|
61
|
+
* Operator facial colors
|
|
62
|
+
*/
|
|
63
|
+
facial?: ColorMap;
|
|
64
|
+
/**
|
|
65
|
+
* Operator cloth colors
|
|
66
|
+
*/
|
|
67
|
+
cloth?: ColorMap;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @param {Object} loadout The operator loadout
|
|
71
|
+
*/
|
|
72
|
+
constructor(loadout: RawOperatorLoadOuts, locale?: Locale);
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { OperatorLoadOuts, RawOperatorLoadOuts };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { translatePolarity } from "warframe-worldstate-data/utilities";
|
|
2
|
+
|
|
3
|
+
//#region src/Polarity.ts
|
|
4
|
+
/**
|
|
5
|
+
* A polarity in a LoadOutItem
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
var Polarity = class {
|
|
9
|
+
/**
|
|
10
|
+
* Polarity name
|
|
11
|
+
*/
|
|
12
|
+
polarity;
|
|
13
|
+
/**
|
|
14
|
+
* Polarized slot
|
|
15
|
+
*/
|
|
16
|
+
slot;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param {Object} raw The polarity to parse
|
|
20
|
+
*/
|
|
21
|
+
constructor(raw) {
|
|
22
|
+
this.polarity = translatePolarity(raw.Value);
|
|
23
|
+
this.slot = raw.Slot;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Polarity };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/Polarity.d.ts
|
|
2
|
+
interface RawPolarity {
|
|
3
|
+
Value: string;
|
|
4
|
+
Slot: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* A polarity in a LoadOutItem
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
declare class Polarity {
|
|
11
|
+
/**
|
|
12
|
+
* Polarity name
|
|
13
|
+
*/
|
|
14
|
+
polarity: string;
|
|
15
|
+
/**
|
|
16
|
+
* Polarized slot
|
|
17
|
+
*/
|
|
18
|
+
slot: number;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param {Object} raw The polarity to parse
|
|
22
|
+
*/
|
|
23
|
+
constructor(raw: RawPolarity);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Polarity, RawPolarity };
|
package/dist/Polarity.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { ChallengeProgress } from "./ChallengeProgress-DKKtijWw.js";
|
|
2
|
+
import { Intrinsics } from "./Intrinsics-CqFOpLxp.js";
|
|
3
|
+
import { LoadOutInventory } from "./LoadOutInventory-CPVZJ_W5.js";
|
|
4
|
+
import { LoadOutPreset } from "./LoadOutPreset-CMbZo-II.js";
|
|
5
|
+
import { Mission } from "./Mission-D2n1i5R2.js";
|
|
6
|
+
import { OperatorLoadOuts } from "./OperatorLoadOuts-B8bEy2dp.js";
|
|
7
|
+
import { Syndicate } from "./Syndicate-CjUKKAsk.js";
|
|
8
|
+
import { parseDate } from "warframe-worldstate-data/utilities";
|
|
9
|
+
|
|
10
|
+
//#region src/Profile.ts
|
|
11
|
+
/**
|
|
12
|
+
* A player's profile
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
var Profile = class {
|
|
16
|
+
/**
|
|
17
|
+
* Player's account ID
|
|
18
|
+
*/
|
|
19
|
+
accountId;
|
|
20
|
+
/**
|
|
21
|
+
* In-game name
|
|
22
|
+
*/
|
|
23
|
+
displayName;
|
|
24
|
+
/**
|
|
25
|
+
* List of usernames across supported platforms
|
|
26
|
+
*/
|
|
27
|
+
platformNames;
|
|
28
|
+
/**
|
|
29
|
+
* Mastery rank
|
|
30
|
+
*/
|
|
31
|
+
masteryRank;
|
|
32
|
+
/**
|
|
33
|
+
* Load out preset equipped
|
|
34
|
+
*/
|
|
35
|
+
preset;
|
|
36
|
+
/**
|
|
37
|
+
* Current loadout
|
|
38
|
+
*/
|
|
39
|
+
loadout;
|
|
40
|
+
/**
|
|
41
|
+
* Railjack and drifter Intrinsics
|
|
42
|
+
*/
|
|
43
|
+
intrinsics;
|
|
44
|
+
/**
|
|
45
|
+
* Nightwave challenges progress
|
|
46
|
+
*/
|
|
47
|
+
challengeProgress;
|
|
48
|
+
/**
|
|
49
|
+
* Guild ID
|
|
50
|
+
*/
|
|
51
|
+
guildId;
|
|
52
|
+
/**
|
|
53
|
+
* Guild name
|
|
54
|
+
*/
|
|
55
|
+
guildName;
|
|
56
|
+
/**
|
|
57
|
+
* Guild tier
|
|
58
|
+
*/
|
|
59
|
+
guildTier;
|
|
60
|
+
/**
|
|
61
|
+
* Guild XP
|
|
62
|
+
*/
|
|
63
|
+
guildXp;
|
|
64
|
+
/**
|
|
65
|
+
* Guild class
|
|
66
|
+
*/
|
|
67
|
+
guildClass;
|
|
68
|
+
/**
|
|
69
|
+
* Guild emblem.
|
|
70
|
+
*/
|
|
71
|
+
guildEmblem;
|
|
72
|
+
/**
|
|
73
|
+
* Alliance ID
|
|
74
|
+
*/
|
|
75
|
+
allianceId;
|
|
76
|
+
/**
|
|
77
|
+
* Assassins currently asfter the player
|
|
78
|
+
*/
|
|
79
|
+
deathMarks;
|
|
80
|
+
/**
|
|
81
|
+
* Whether or not the player is qualified as a target for Zanuka
|
|
82
|
+
* @type {boolean}
|
|
83
|
+
*/
|
|
84
|
+
harvestable;
|
|
85
|
+
/**
|
|
86
|
+
* Whether or not the player is qualified as a target for a syndicate death squad
|
|
87
|
+
*/
|
|
88
|
+
deathSquadable;
|
|
89
|
+
/**
|
|
90
|
+
* Date the account was created
|
|
91
|
+
*/
|
|
92
|
+
created;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the user has migrated to console or not
|
|
95
|
+
*/
|
|
96
|
+
migratedToConsole;
|
|
97
|
+
/**
|
|
98
|
+
* List of completed missions and their completions
|
|
99
|
+
*/
|
|
100
|
+
missions;
|
|
101
|
+
/**
|
|
102
|
+
* Player standing and title across all syndicates
|
|
103
|
+
*/
|
|
104
|
+
syndicates;
|
|
105
|
+
/**
|
|
106
|
+
* Daily standing per Syndicate
|
|
107
|
+
*
|
|
108
|
+
* Faction syndicates all share daily standing
|
|
109
|
+
*/
|
|
110
|
+
dailyStanding;
|
|
111
|
+
/**
|
|
112
|
+
* Daily focus
|
|
113
|
+
*/
|
|
114
|
+
dailyFocus;
|
|
115
|
+
/**
|
|
116
|
+
* Player wishlist for in-game market items
|
|
117
|
+
*/
|
|
118
|
+
wishList;
|
|
119
|
+
/**
|
|
120
|
+
* Whether the player has unlocked their operator or not
|
|
121
|
+
*/
|
|
122
|
+
unlockedOperator;
|
|
123
|
+
/**
|
|
124
|
+
* Whether the player has unlocked their alignment or not
|
|
125
|
+
*/
|
|
126
|
+
unlockedAlignment;
|
|
127
|
+
/**
|
|
128
|
+
* Operator loadout
|
|
129
|
+
*/
|
|
130
|
+
operatorLoadouts;
|
|
131
|
+
/**
|
|
132
|
+
* Player's alignment
|
|
133
|
+
*/
|
|
134
|
+
alignment;
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
* @param profile The profile data to parse
|
|
138
|
+
* @param locale The locale to return in where possible
|
|
139
|
+
* @param withItem Whether or not to include items
|
|
140
|
+
*/
|
|
141
|
+
constructor(profile, locale = "en", withItem = false) {
|
|
142
|
+
this.accountId = profile.AccountId.$oid;
|
|
143
|
+
this.displayName = profile.DisplayName;
|
|
144
|
+
this.platformNames = profile.PlatformNames ?? [];
|
|
145
|
+
this.masteryRank = profile.PlayerLevel;
|
|
146
|
+
if (profile.LoadOutPreset) this.preset = new LoadOutPreset(profile.LoadOutPreset);
|
|
147
|
+
this.loadout = new LoadOutInventory(profile.LoadOutInventory, locale, withItem);
|
|
148
|
+
this.intrinsics = new Intrinsics(profile.PlayerSkills ?? {});
|
|
149
|
+
this.challengeProgress = profile.ChallengeProgress.map((c) => new ChallengeProgress(c));
|
|
150
|
+
if (profile.GuildId?.$oid) this.guildId = profile.GuildId.$oid;
|
|
151
|
+
this.guildName = profile.GuildName;
|
|
152
|
+
this.guildTier = profile.GuildTier;
|
|
153
|
+
this.guildXp = profile.GuildXp;
|
|
154
|
+
this.guildClass = profile.GuildClass;
|
|
155
|
+
this.guildEmblem = profile.GuildEmblem;
|
|
156
|
+
if (profile.AllianceId) this.allianceId = profile.AllianceId.$oid;
|
|
157
|
+
this.deathMarks = profile.DeathMarks;
|
|
158
|
+
this.harvestable = profile.Harvestable;
|
|
159
|
+
this.deathSquadable = profile.DeathSquadable;
|
|
160
|
+
this.created = parseDate(profile.Created);
|
|
161
|
+
this.migratedToConsole = profile.MigratedToConsole;
|
|
162
|
+
this.missions = profile.Missions.map((m) => new Mission(m, locale));
|
|
163
|
+
this.syndicates = profile.Affiliations?.map((a) => new Syndicate(a, locale)) ?? [];
|
|
164
|
+
this.dailyStanding = {
|
|
165
|
+
daily: profile.DailyAffiliation,
|
|
166
|
+
conclave: profile.DailyAffiliationPvp,
|
|
167
|
+
simaris: profile.DailyAffiliationLibrary,
|
|
168
|
+
ostron: profile.DailyAffiliationCetus,
|
|
169
|
+
quills: profile.DailyAffiliationQuills,
|
|
170
|
+
solaris: profile.DailyAffiliationSolaris,
|
|
171
|
+
ventKids: profile.DailyAffiliationVentkids,
|
|
172
|
+
voxSolaris: profile.DailyAffiliationVox,
|
|
173
|
+
entrati: profile.DailyAffiliationEntrati,
|
|
174
|
+
necraloid: profile.DailyAffiliationNecraloid,
|
|
175
|
+
holdfasts: profile.DailyAffiliationZariman,
|
|
176
|
+
kahl: profile.DailyAffiliationKahl,
|
|
177
|
+
cavia: profile.DailyAffiliationCavia,
|
|
178
|
+
hex: profile.DailyAffiliationHex
|
|
179
|
+
};
|
|
180
|
+
this.dailyFocus = profile.DailyFocus;
|
|
181
|
+
this.wishList = profile.Wishlist;
|
|
182
|
+
this.unlockedOperator = profile.UnlockedOperator;
|
|
183
|
+
this.unlockedAlignment = profile.UnlockedAlignment;
|
|
184
|
+
this.operatorLoadouts = profile.OperatorLoadOuts?.map((ol) => new OperatorLoadOuts(ol, locale));
|
|
185
|
+
if (profile.Alignment) this.alignment = {
|
|
186
|
+
wisdom: profile.Alignment?.Wisdom,
|
|
187
|
+
alignment: profile.Alignment?.Alignment
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
//#endregion
|
|
193
|
+
export { Profile };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import Mission,
|
|
7
|
-
import OperatorLoadOuts,
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { ChallengeProgress, RawChallengeProgress } from "./ChallengeProgress-B8Kv32oi.js";
|
|
2
|
+
import { Intrinsics, RawIntrinsics } from "./Intrinsics-azrsOZJd.js";
|
|
3
|
+
import { RawDate, RawId } from "./Utils-C7BZqK4e.js";
|
|
4
|
+
import { LoadOutInventory, RawLoadOut } from "./LoadOutInventory-BsPRtXfG.js";
|
|
5
|
+
import { LoadOutPreset, RawLoadOutPreset } from "./LoadOutPreset-BshJF0LH.js";
|
|
6
|
+
import { Mission, RawMission } from "./Mission-BZgLMluh.js";
|
|
7
|
+
import { OperatorLoadOuts, RawOperatorLoadOuts } from "./OperatorLoadOuts-Dk2uMwby.js";
|
|
8
|
+
import { RawAffiliation, Syndicate } from "./Syndicate-FSUt1PP5.js";
|
|
9
|
+
import { Locale } from "warframe-worldstate-data";
|
|
10
|
+
|
|
11
|
+
//#region src/Profile.d.ts
|
|
12
|
+
interface RawProfile {
|
|
13
|
+
AccountId: {
|
|
14
|
+
$oid: string;
|
|
15
|
+
};
|
|
15
16
|
DisplayName: string;
|
|
16
17
|
PlatformNames?: string[];
|
|
17
18
|
PlayerLevel: number;
|
|
@@ -52,125 +53,105 @@ export interface RawProfile {
|
|
|
52
53
|
UnlockedOperator: boolean;
|
|
53
54
|
UnlockedAlignment: boolean;
|
|
54
55
|
OperatorLoadOuts: RawOperatorLoadOuts[];
|
|
55
|
-
Alignment: {
|
|
56
|
+
Alignment: {
|
|
57
|
+
Wisdom: number;
|
|
58
|
+
Alignment: number;
|
|
59
|
+
};
|
|
56
60
|
}
|
|
57
|
-
|
|
58
61
|
/**
|
|
59
62
|
* A player's profile
|
|
60
63
|
* @module
|
|
61
64
|
*/
|
|
62
|
-
|
|
65
|
+
declare class Profile {
|
|
63
66
|
/**
|
|
64
67
|
* Player's account ID
|
|
65
68
|
*/
|
|
66
69
|
accountId: string;
|
|
67
|
-
|
|
68
70
|
/**
|
|
69
71
|
* In-game name
|
|
70
72
|
*/
|
|
71
73
|
displayName: string;
|
|
72
|
-
|
|
73
74
|
/**
|
|
74
75
|
* List of usernames across supported platforms
|
|
75
76
|
*/
|
|
76
77
|
platformNames: string[];
|
|
77
|
-
|
|
78
78
|
/**
|
|
79
79
|
* Mastery rank
|
|
80
80
|
*/
|
|
81
81
|
masteryRank: number;
|
|
82
|
-
|
|
83
82
|
/**
|
|
84
83
|
* Load out preset equipped
|
|
85
84
|
*/
|
|
86
85
|
preset?: LoadOutPreset;
|
|
87
|
-
|
|
88
86
|
/**
|
|
89
87
|
* Current loadout
|
|
90
88
|
*/
|
|
91
89
|
loadout: LoadOutInventory;
|
|
92
|
-
|
|
93
90
|
/**
|
|
94
91
|
* Railjack and drifter Intrinsics
|
|
95
92
|
*/
|
|
96
93
|
intrinsics?: Intrinsics;
|
|
97
|
-
|
|
98
94
|
/**
|
|
99
95
|
* Nightwave challenges progress
|
|
100
96
|
*/
|
|
101
97
|
challengeProgress: ChallengeProgress[];
|
|
102
|
-
|
|
103
98
|
/**
|
|
104
99
|
* Guild ID
|
|
105
100
|
*/
|
|
106
101
|
guildId?: string;
|
|
107
|
-
|
|
108
102
|
/**
|
|
109
103
|
* Guild name
|
|
110
104
|
*/
|
|
111
105
|
guildName?: string;
|
|
112
|
-
|
|
113
106
|
/**
|
|
114
107
|
* Guild tier
|
|
115
108
|
*/
|
|
116
109
|
guildTier?: number;
|
|
117
|
-
|
|
118
110
|
/**
|
|
119
111
|
* Guild XP
|
|
120
112
|
*/
|
|
121
113
|
guildXp?: number;
|
|
122
|
-
|
|
123
114
|
/**
|
|
124
115
|
* Guild class
|
|
125
116
|
*/
|
|
126
117
|
guildClass?: number;
|
|
127
|
-
|
|
128
118
|
/**
|
|
129
119
|
* Guild emblem.
|
|
130
120
|
*/
|
|
131
121
|
guildEmblem: boolean;
|
|
132
|
-
|
|
133
122
|
/**
|
|
134
123
|
* Alliance ID
|
|
135
124
|
*/
|
|
136
125
|
allianceId?: string;
|
|
137
|
-
|
|
138
126
|
/**
|
|
139
127
|
* Assassins currently asfter the player
|
|
140
128
|
*/
|
|
141
129
|
deathMarks: string[];
|
|
142
|
-
|
|
143
130
|
/**
|
|
144
131
|
* Whether or not the player is qualified as a target for Zanuka
|
|
145
132
|
* @type {boolean}
|
|
146
133
|
*/
|
|
147
134
|
harvestable: boolean;
|
|
148
|
-
|
|
149
135
|
/**
|
|
150
136
|
* Whether or not the player is qualified as a target for a syndicate death squad
|
|
151
137
|
*/
|
|
152
138
|
deathSquadable: boolean;
|
|
153
|
-
|
|
154
139
|
/**
|
|
155
140
|
* Date the account was created
|
|
156
141
|
*/
|
|
157
142
|
created: Date;
|
|
158
|
-
|
|
159
143
|
/**
|
|
160
144
|
* Whether the user has migrated to console or not
|
|
161
145
|
*/
|
|
162
146
|
migratedToConsole: boolean;
|
|
163
|
-
|
|
164
147
|
/**
|
|
165
148
|
* List of completed missions and their completions
|
|
166
149
|
*/
|
|
167
150
|
missions: Mission[];
|
|
168
|
-
|
|
169
151
|
/**
|
|
170
152
|
* Player standing and title across all syndicates
|
|
171
153
|
*/
|
|
172
154
|
syndicates?: Syndicate[];
|
|
173
|
-
|
|
174
155
|
/**
|
|
175
156
|
* Daily standing per Syndicate
|
|
176
157
|
*
|
|
@@ -192,117 +173,40 @@ export default class Profile {
|
|
|
192
173
|
cavia?: number;
|
|
193
174
|
hex?: number;
|
|
194
175
|
};
|
|
195
|
-
|
|
196
176
|
/**
|
|
197
177
|
* Daily focus
|
|
198
178
|
*/
|
|
199
179
|
dailyFocus?: number;
|
|
200
|
-
|
|
201
180
|
/**
|
|
202
181
|
* Player wishlist for in-game market items
|
|
203
182
|
*/
|
|
204
183
|
wishList: any;
|
|
205
|
-
|
|
206
184
|
/**
|
|
207
185
|
* Whether the player has unlocked their operator or not
|
|
208
186
|
*/
|
|
209
187
|
unlockedOperator: boolean;
|
|
210
|
-
|
|
211
188
|
/**
|
|
212
189
|
* Whether the player has unlocked their alignment or not
|
|
213
190
|
*/
|
|
214
191
|
unlockedAlignment: boolean;
|
|
215
|
-
|
|
216
192
|
/**
|
|
217
193
|
* Operator loadout
|
|
218
194
|
*/
|
|
219
195
|
operatorLoadouts?: OperatorLoadOuts[];
|
|
220
|
-
|
|
221
196
|
/**
|
|
222
197
|
* Player's alignment
|
|
223
198
|
*/
|
|
224
|
-
alignment?: {
|
|
225
|
-
|
|
199
|
+
alignment?: {
|
|
200
|
+
wisdom: number;
|
|
201
|
+
alignment: number;
|
|
202
|
+
};
|
|
226
203
|
/**
|
|
227
204
|
*
|
|
228
205
|
* @param profile The profile data to parse
|
|
229
206
|
* @param locale The locale to return in where possible
|
|
230
207
|
* @param withItem Whether or not to include items
|
|
231
208
|
*/
|
|
232
|
-
constructor(profile: RawProfile, locale
|
|
233
|
-
this.accountId = profile.AccountId.$oid;
|
|
234
|
-
|
|
235
|
-
this.displayName = profile.DisplayName;
|
|
236
|
-
|
|
237
|
-
this.platformNames = profile.PlatformNames ?? [];
|
|
238
|
-
|
|
239
|
-
this.masteryRank = profile.PlayerLevel;
|
|
240
|
-
|
|
241
|
-
if (profile.LoadOutPreset) this.preset = new LoadOutPreset(profile.LoadOutPreset);
|
|
242
|
-
|
|
243
|
-
this.loadout = new LoadOutInventory(profile.LoadOutInventory, locale, withItem);
|
|
244
|
-
|
|
245
|
-
this.intrinsics = new Intrinsics(profile.PlayerSkills ?? {});
|
|
246
|
-
|
|
247
|
-
this.challengeProgress = profile.ChallengeProgress.map((c) => new ChallengeProgress(c));
|
|
248
|
-
|
|
249
|
-
if (profile.GuildId?.$oid) this.guildId = profile.GuildId.$oid;
|
|
250
|
-
|
|
251
|
-
this.guildName = profile.GuildName;
|
|
252
|
-
|
|
253
|
-
this.guildTier = profile.GuildTier;
|
|
254
|
-
|
|
255
|
-
this.guildXp = profile.GuildXp;
|
|
256
|
-
|
|
257
|
-
this.guildClass = profile.GuildClass;
|
|
258
|
-
|
|
259
|
-
this.guildEmblem = profile.GuildEmblem;
|
|
260
|
-
|
|
261
|
-
if (profile.AllianceId) this.allianceId = profile.AllianceId.$oid;
|
|
262
|
-
|
|
263
|
-
this.deathMarks = profile.DeathMarks;
|
|
264
|
-
|
|
265
|
-
this.harvestable = profile.Harvestable;
|
|
266
|
-
|
|
267
|
-
this.deathSquadable = profile.DeathSquadable;
|
|
268
|
-
|
|
269
|
-
this.created = parseDate(profile.Created);
|
|
270
|
-
|
|
271
|
-
this.migratedToConsole = profile.MigratedToConsole;
|
|
272
|
-
|
|
273
|
-
this.missions = profile.Missions.map((m) => new Mission(m, locale));
|
|
274
|
-
|
|
275
|
-
this.syndicates = profile.Affiliations?.map((a) => new Syndicate(a, locale)) ?? [];
|
|
276
|
-
|
|
277
|
-
this.dailyStanding = {
|
|
278
|
-
daily: profile.DailyAffiliation,
|
|
279
|
-
conclave: profile.DailyAffiliationPvp,
|
|
280
|
-
simaris: profile.DailyAffiliationLibrary,
|
|
281
|
-
ostron: profile.DailyAffiliationCetus,
|
|
282
|
-
quills: profile.DailyAffiliationQuills,
|
|
283
|
-
solaris: profile.DailyAffiliationSolaris,
|
|
284
|
-
ventKids: profile.DailyAffiliationVentkids,
|
|
285
|
-
voxSolaris: profile.DailyAffiliationVox,
|
|
286
|
-
entrati: profile.DailyAffiliationEntrati,
|
|
287
|
-
necraloid: profile.DailyAffiliationNecraloid,
|
|
288
|
-
holdfasts: profile.DailyAffiliationZariman,
|
|
289
|
-
kahl: profile.DailyAffiliationKahl,
|
|
290
|
-
cavia: profile.DailyAffiliationCavia,
|
|
291
|
-
hex: profile.DailyAffiliationHex,
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
this.dailyFocus = profile.DailyFocus;
|
|
295
|
-
|
|
296
|
-
this.wishList = profile.Wishlist;
|
|
297
|
-
|
|
298
|
-
this.unlockedOperator = profile.UnlockedOperator;
|
|
299
|
-
|
|
300
|
-
this.unlockedAlignment = profile.UnlockedAlignment;
|
|
301
|
-
|
|
302
|
-
this.operatorLoadouts = profile.OperatorLoadOuts?.map((ol) => new OperatorLoadOuts(ol, locale));
|
|
303
|
-
|
|
304
|
-
if (profile.Alignment) {
|
|
305
|
-
this.alignment = { wisdom: profile.Alignment?.Wisdom, alignment: profile.Alignment?.Alignment };
|
|
306
|
-
}
|
|
307
|
-
}
|
|
209
|
+
constructor(profile: RawProfile, locale?: Locale, withItem?: boolean);
|
|
308
210
|
}
|
|
211
|
+
//#endregion
|
|
212
|
+
export { Profile, RawProfile };
|