@wfcd/profile-parser 2.0.11 → 2.0.12
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.d.mts +18 -1
- package/dist/Ability.mjs +23 -1
- package/dist/ChallengeProgress.d.mts +19 -1
- package/dist/ChallengeProgress.mjs +24 -1
- package/dist/Enemy.d.mts +43 -1
- package/dist/Enemy.mjs +42 -1
- package/dist/Intrinsics.d.mts +66 -1
- package/dist/Intrinsics.mjs +65 -1
- package/dist/ItemConfig.d.mts +50 -3
- package/dist/ItemConfig.mjs +48 -3
- package/dist/LoadOutInventory.d.mts +52 -6
- package/dist/LoadOutInventory.mjs +50 -7
- package/dist/LoadOutItem.d.mts +119 -4
- package/dist/LoadOutItem.mjs +125 -5
- package/dist/LoadOutPreset.d.mts +82 -1
- package/dist/LoadOutPreset.mjs +81 -2
- package/dist/Mission.d.mts +52 -1
- package/dist/Mission.mjs +53 -1
- package/dist/OperatorLoadOuts.d.mts +80 -3
- package/dist/OperatorLoadOuts.mjs +74 -3
- package/dist/Polarity.d.mts +25 -1
- package/dist/Polarity.mjs +26 -1
- package/dist/Profile.d.mts +10 -14
- package/dist/Profile.mjs +7 -13
- package/dist/ProfileParser.d.mts +5 -11
- package/dist/ProfileParser.mjs +2 -13
- package/dist/Pvp.d.mts +35 -1
- package/dist/Pvp.mjs +34 -1
- package/dist/Race.d.mts +31 -1
- package/dist/Race.mjs +33 -1
- package/dist/Scan.d.mts +26 -1
- package/dist/Scan.mjs +25 -1
- package/dist/Skin.d.mts +27 -1
- package/dist/Skin.mjs +34 -2
- package/dist/Stats.d.mts +7 -7
- package/dist/Stats.mjs +7 -7
- package/dist/Syndicate.d.mts +32 -1
- package/dist/Syndicate.mjs +31 -1
- package/dist/Utils.d.mts +35 -1
- package/dist/Utils.mjs +58 -1
- package/dist/Weapon.d.mts +31 -1
- package/dist/Weapon.mjs +62 -1
- package/dist/XpInfo.d.mts +33 -1
- package/dist/XpInfo.mjs +33 -2
- package/package.json +8 -9
- package/dist/Ability-CmHyNfw4.d.mts +0 -19
- package/dist/Ability-DsyqxzjP.mjs +0 -25
- package/dist/ChallengeProgress-BO8tPybG.d.mts +0 -20
- package/dist/ChallengeProgress-Cpks92At.mjs +0 -26
- package/dist/Enemy-5RVVfZme.d.mts +0 -44
- package/dist/Enemy-B3JSksZZ.mjs +0 -44
- package/dist/Intrinsics-DwonOlUE.d.mts +0 -67
- package/dist/Intrinsics-kYw_LPq1.mjs +0 -67
- package/dist/ItemConfig-DTIrA_P_.mjs +0 -50
- package/dist/ItemConfig-DxhXby04.d.mts +0 -51
- package/dist/LoadOutInventory-B84bUV2-.d.mts +0 -53
- package/dist/LoadOutInventory-BbaIazHX.mjs +0 -52
- package/dist/LoadOutItem-DWQ4aFI_.d.mts +0 -120
- package/dist/LoadOutItem-p-f5RdTB.mjs +0 -127
- package/dist/LoadOutPreset-CwbK2VvR.mjs +0 -83
- package/dist/LoadOutPreset-m_1RVkf9.d.mts +0 -83
- package/dist/Mission-CeX2BRp0.d.mts +0 -53
- package/dist/Mission-DfGQMV7B.mjs +0 -55
- package/dist/OperatorLoadOuts-51DN5Rwo.d.mts +0 -75
- package/dist/OperatorLoadOuts-LYGpTHuj.mjs +0 -76
- package/dist/Polarity-KCoYUO6f.d.mts +0 -26
- package/dist/Polarity-Q2JfovbR.mjs +0 -28
- package/dist/Pvp-DCfleh26.mjs +0 -36
- package/dist/Pvp-R4iYmiAT.d.mts +0 -36
- package/dist/Race-DXOXL9VT.d.mts +0 -32
- package/dist/Race-dyrF8Zs5.mjs +0 -35
- package/dist/Scan-CJnYpzKb.d.mts +0 -27
- package/dist/Scan-D4p43-1c.mjs +0 -27
- package/dist/Skin-DJMr6L-X.d.mts +0 -28
- package/dist/Skin-D_brWp2g.mjs +0 -36
- package/dist/Syndicate-CcRnzmZs.mjs +0 -33
- package/dist/Syndicate-Dq5vLEB-.d.mts +0 -33
- package/dist/Utils-Bqm2Gg1K.mjs +0 -59
- package/dist/Utils-VTFhFHIp.d.mts +0 -37
- package/dist/Weapon-CsKff27X.mjs +0 -64
- package/dist/Weapon-DgQ4hNgE.d.mts +0 -32
- package/dist/XpInfo-IT6LOTzI.mjs +0 -35
- package/dist/XpInfo-qplT5008.d.mts +0 -34
package/dist/ProfileParser.d.mts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { n as RawDate } from "./Utils-VTFhFHIp.mjs";
|
|
3
|
-
import "./ItemConfig-DxhXby04.mjs";
|
|
4
|
-
import "./LoadOutItem-DWQ4aFI_.mjs";
|
|
5
|
-
import "./XpInfo-qplT5008.mjs";
|
|
6
|
-
import "./LoadOutInventory-B84bUV2-.mjs";
|
|
7
|
-
import "./OperatorLoadOuts-51DN5Rwo.mjs";
|
|
1
|
+
import { RawDate } from "./Utils.mjs";
|
|
8
2
|
import Profile, { RawProfile } from "./Profile.mjs";
|
|
9
3
|
import Stats, { RawStats } from "./Stats.mjs";
|
|
10
4
|
import { Locale } from "warframe-worldstate-data";
|
|
@@ -12,8 +6,8 @@ import { Locale } from "warframe-worldstate-data";
|
|
|
12
6
|
//#region src/ProfileParser.d.ts
|
|
13
7
|
interface ProfileData {
|
|
14
8
|
Results: RawProfile[];
|
|
15
|
-
TechProjects?:
|
|
16
|
-
|
|
9
|
+
TechProjects?: Array<object>;
|
|
10
|
+
XpComponents?: Array<object>;
|
|
17
11
|
XpCacheExpiryDate?: RawDate;
|
|
18
12
|
CeremonyResetDate?: RawDate;
|
|
19
13
|
Stats: RawStats;
|
|
@@ -30,11 +24,11 @@ declare class ProfileParser {
|
|
|
30
24
|
/**
|
|
31
25
|
* N/A
|
|
32
26
|
*/
|
|
33
|
-
techProjects:
|
|
27
|
+
techProjects: Array<object>;
|
|
34
28
|
/**
|
|
35
29
|
* N/A
|
|
36
30
|
*/
|
|
37
|
-
xpComponents:
|
|
31
|
+
xpComponents: Array<object>;
|
|
38
32
|
/**
|
|
39
33
|
* N/A
|
|
40
34
|
*/
|
package/dist/ProfileParser.mjs
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import "./Utils-Bqm2Gg1K.mjs";
|
|
2
|
-
import "./Skin-D_brWp2g.mjs";
|
|
3
|
-
import "./ItemConfig-DTIrA_P_.mjs";
|
|
4
|
-
import "./Polarity-Q2JfovbR.mjs";
|
|
5
|
-
import "./LoadOutItem-p-f5RdTB.mjs";
|
|
6
|
-
import "./XpInfo-IT6LOTzI.mjs";
|
|
7
|
-
import "./LoadOutInventory-BbaIazHX.mjs";
|
|
8
|
-
import "./LoadOutPreset-CwbK2VvR.mjs";
|
|
9
|
-
import "./Mission-DfGQMV7B.mjs";
|
|
10
|
-
import "./OperatorLoadOuts-LYGpTHuj.mjs";
|
|
11
|
-
import "./Syndicate-CcRnzmZs.mjs";
|
|
12
1
|
import Profile from "./Profile.mjs";
|
|
13
2
|
import Stats from "./Stats.mjs";
|
|
14
3
|
import { parseDate } from "warframe-worldstate-data/utilities";
|
|
@@ -51,8 +40,8 @@ var ProfileParser = class {
|
|
|
51
40
|
*/
|
|
52
41
|
constructor(data, locale = "en", withItem = false) {
|
|
53
42
|
this.profile = new Profile(data.Results[0], locale, withItem);
|
|
54
|
-
this.techProjects = data.TechProjects;
|
|
55
|
-
this.xpComponents = data.
|
|
43
|
+
this.techProjects = data.TechProjects ?? [];
|
|
44
|
+
this.xpComponents = data.XpComponents ?? [];
|
|
56
45
|
this.xpCacheExpiryDate = parseDate(data.XpCacheExpiryDate);
|
|
57
46
|
this.ceremonyResetDate = parseDate(data.CeremonyResetDate);
|
|
58
47
|
this.stats = new Stats(data.Stats);
|
package/dist/Pvp.d.mts
CHANGED
|
@@ -1,2 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Pvp.d.ts
|
|
2
|
+
interface RawPvp {
|
|
3
|
+
type: string;
|
|
4
|
+
suitDeaths?: number;
|
|
5
|
+
suitKills?: number;
|
|
6
|
+
weaponKills?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Player's conclave stats
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
declare class Pvp {
|
|
13
|
+
/**
|
|
14
|
+
* PVP match unique name
|
|
15
|
+
*/
|
|
16
|
+
uniqueName: string;
|
|
17
|
+
/**
|
|
18
|
+
* Deaths for this match
|
|
19
|
+
*/
|
|
20
|
+
warframeDeaths?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Warframe kills
|
|
23
|
+
*/
|
|
24
|
+
warframeKills?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Weapon killes
|
|
27
|
+
*/
|
|
28
|
+
weaponKills?: number;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} pvp PVP data to parse
|
|
32
|
+
*/
|
|
33
|
+
constructor(pvp: RawPvp);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
2
36
|
export { RawPvp, Pvp as default };
|
package/dist/Pvp.mjs
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Pvp.ts
|
|
2
|
+
/**
|
|
3
|
+
* Player's conclave stats
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
var Pvp = class {
|
|
7
|
+
/**
|
|
8
|
+
* PVP match unique name
|
|
9
|
+
*/
|
|
10
|
+
uniqueName;
|
|
11
|
+
/**
|
|
12
|
+
* Deaths for this match
|
|
13
|
+
*/
|
|
14
|
+
warframeDeaths;
|
|
15
|
+
/**
|
|
16
|
+
* Warframe kills
|
|
17
|
+
*/
|
|
18
|
+
warframeKills;
|
|
19
|
+
/**
|
|
20
|
+
* Weapon killes
|
|
21
|
+
*/
|
|
22
|
+
weaponKills;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param {Object} pvp PVP data to parse
|
|
26
|
+
*/
|
|
27
|
+
constructor(pvp) {
|
|
28
|
+
this.uniqueName = pvp.type;
|
|
29
|
+
this.warframeDeaths = pvp.suitDeaths;
|
|
30
|
+
this.warframeKills = pvp.suitKills;
|
|
31
|
+
this.weaponKills = pvp.weaponKills;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
2
34
|
|
|
35
|
+
//#endregion
|
|
3
36
|
export { Pvp as default };
|
package/dist/Race.d.mts
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Race.d.ts
|
|
2
|
+
type RawRace = Record<string, {
|
|
3
|
+
highScore: number;
|
|
4
|
+
}>;
|
|
5
|
+
/**
|
|
6
|
+
* Represents a k-drive race
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
declare class Race {
|
|
10
|
+
/**
|
|
11
|
+
* Race name
|
|
12
|
+
*/
|
|
13
|
+
uniqueName: string;
|
|
14
|
+
/**
|
|
15
|
+
* Race High score
|
|
16
|
+
*/
|
|
17
|
+
highScore: number;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @param type Race name
|
|
21
|
+
* @param highScore high score
|
|
22
|
+
*/
|
|
23
|
+
constructor(type: string, highScore: number);
|
|
24
|
+
/**
|
|
25
|
+
* Created an array of Race objects from DE's Races array
|
|
26
|
+
* @param races Array of races
|
|
27
|
+
* @returns {Race[]} An array of races formatted in a more consumable way.
|
|
28
|
+
*/
|
|
29
|
+
static fromRaceObject(races: RawRace): Race[];
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
2
32
|
export { RawRace, Race as default };
|
package/dist/Race.mjs
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Race.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents a k-drive race
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
var Race = class Race {
|
|
7
|
+
/**
|
|
8
|
+
* Race name
|
|
9
|
+
*/
|
|
10
|
+
uniqueName;
|
|
11
|
+
/**
|
|
12
|
+
* Race High score
|
|
13
|
+
*/
|
|
14
|
+
highScore;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param type Race name
|
|
18
|
+
* @param highScore high score
|
|
19
|
+
*/
|
|
20
|
+
constructor(type, highScore) {
|
|
21
|
+
this.uniqueName = type;
|
|
22
|
+
this.highScore = highScore;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Created an array of Race objects from DE's Races array
|
|
26
|
+
* @param races Array of races
|
|
27
|
+
* @returns {Race[]} An array of races formatted in a more consumable way.
|
|
28
|
+
*/
|
|
29
|
+
static fromRaceObject(races) {
|
|
30
|
+
return Object.entries(races ?? {}).map(([type, { highScore }]) => new Race(type, highScore));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
2
33
|
|
|
34
|
+
//#endregion
|
|
3
35
|
export { Race as default };
|
package/dist/Scan.d.mts
CHANGED
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Scan.d.ts
|
|
2
|
+
interface RawScan {
|
|
3
|
+
type: string;
|
|
4
|
+
scans: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Represents an enemy scanned to the codex
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
declare class Scan {
|
|
11
|
+
/**
|
|
12
|
+
* Enemy unique name
|
|
13
|
+
* @type {String}
|
|
14
|
+
*/
|
|
15
|
+
uniqueName: string;
|
|
16
|
+
/**
|
|
17
|
+
* Number of scans done
|
|
18
|
+
* @type {number}
|
|
19
|
+
*/
|
|
20
|
+
scans: number;
|
|
21
|
+
/**
|
|
22
|
+
* @param {Object} scan The scanned Warframe object
|
|
23
|
+
*/
|
|
24
|
+
constructor(scan: RawScan);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
2
27
|
export { RawScan, Scan as default };
|
package/dist/Scan.mjs
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Scan.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents an enemy scanned to the codex
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
var Scan = class {
|
|
7
|
+
/**
|
|
8
|
+
* Enemy unique name
|
|
9
|
+
* @type {String}
|
|
10
|
+
*/
|
|
11
|
+
uniqueName;
|
|
12
|
+
/**
|
|
13
|
+
* Number of scans done
|
|
14
|
+
* @type {number}
|
|
15
|
+
*/
|
|
16
|
+
scans;
|
|
17
|
+
/**
|
|
18
|
+
* @param {Object} scan The scanned Warframe object
|
|
19
|
+
*/
|
|
20
|
+
constructor(scan) {
|
|
21
|
+
this.uniqueName = scan.type;
|
|
22
|
+
this.scans = scan.scans;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
2
25
|
|
|
26
|
+
//#endregion
|
|
3
27
|
export { Scan as default };
|
package/dist/Skin.d.mts
CHANGED
|
@@ -1,2 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Item } from "@wfcd/items";
|
|
2
|
+
|
|
3
|
+
//#region src/Skin.d.ts
|
|
4
|
+
interface RawSkin {
|
|
5
|
+
ItemType: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A skin class
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
declare class Skin {
|
|
12
|
+
uniqueName: string;
|
|
13
|
+
item?: Item;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param skin The skin data to parse
|
|
17
|
+
* @param locale The locale to return skin item in
|
|
18
|
+
*/
|
|
19
|
+
constructor(skin: RawSkin, locale?: string);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Move to Skin, this is just here to not break anything for early users
|
|
23
|
+
* @param {Object} skin Skin object
|
|
24
|
+
* @returns {Skin} Skin object with possible item
|
|
25
|
+
*/
|
|
26
|
+
declare const WeaponSkin: (skin: RawSkin) => Skin;
|
|
27
|
+
//#endregion
|
|
2
28
|
export { RawSkin, WeaponSkin, Skin as default };
|
package/dist/Skin.mjs
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
import "./Utils
|
|
2
|
-
import { n as WeaponSkin, t as Skin } from "./Skin-D_brWp2g.mjs";
|
|
1
|
+
import { find } from "./Utils.mjs";
|
|
3
2
|
|
|
3
|
+
//#region src/Skin.ts
|
|
4
|
+
/**
|
|
5
|
+
* A skin class
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
var Skin = class {
|
|
9
|
+
uniqueName;
|
|
10
|
+
item;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param skin The skin data to parse
|
|
14
|
+
* @param locale The locale to return skin item in
|
|
15
|
+
*/
|
|
16
|
+
constructor(skin, locale = "en") {
|
|
17
|
+
/**
|
|
18
|
+
* Unique name
|
|
19
|
+
*/
|
|
20
|
+
this.uniqueName = skin.ItemType;
|
|
21
|
+
const item = find(skin.ItemType, locale);
|
|
22
|
+
/**
|
|
23
|
+
* The Warframe item that matches the unique name
|
|
24
|
+
*/
|
|
25
|
+
if (item) this.item = item;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Move to Skin, this is just here to not break anything for early users
|
|
30
|
+
* @param {Object} skin Skin object
|
|
31
|
+
* @returns {Skin} Skin object with possible item
|
|
32
|
+
*/
|
|
33
|
+
const WeaponSkin = (skin) => new Skin(skin);
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
4
36
|
export { WeaponSkin, Skin as default };
|
package/dist/Stats.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import Ability, { RawAbility } from "./Ability.mjs";
|
|
2
|
+
import Enemy, { RawEnemy } from "./Enemy.mjs";
|
|
3
|
+
import Mission, { RawMission } from "./Mission.mjs";
|
|
4
|
+
import Pvp, { RawPvp } from "./Pvp.mjs";
|
|
5
|
+
import Race, { RawRace } from "./Race.mjs";
|
|
6
|
+
import Scan, { RawScan } from "./Scan.mjs";
|
|
7
|
+
import Weapon, { RawWeapon } from "./Weapon.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/Stats.d.ts
|
|
10
10
|
interface RawStats {
|
package/dist/Stats.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import Ability from "./Ability.mjs";
|
|
2
|
+
import Enemy from "./Enemy.mjs";
|
|
3
|
+
import Mission from "./Mission.mjs";
|
|
4
|
+
import Pvp from "./Pvp.mjs";
|
|
5
|
+
import Race from "./Race.mjs";
|
|
6
|
+
import Scan from "./Scan.mjs";
|
|
7
|
+
import Weapon from "./Weapon.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/Stats.ts
|
|
10
10
|
/**
|
package/dist/Syndicate.d.mts
CHANGED
|
@@ -1,2 +1,33 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
33
|
export { RawAffiliation, Syndicate as default };
|
package/dist/Syndicate.mjs
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { syndicate } from "warframe-worldstate-data/utilities";
|
|
2
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
|
|
3
33
|
export { Syndicate as default };
|
package/dist/Utils.d.mts
CHANGED
|
@@ -1,2 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WorldStateDate } from "warframe-worldstate-data/utilities";
|
|
2
|
+
import { Item, RawColors } from "@wfcd/items";
|
|
3
|
+
|
|
4
|
+
//#region src/Utils.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* interface for DE's ID data
|
|
7
|
+
*/
|
|
8
|
+
interface RawId {
|
|
9
|
+
$oid: string;
|
|
10
|
+
}
|
|
11
|
+
type RawDate = WorldStateDate;
|
|
12
|
+
interface ProfileRawColors {
|
|
13
|
+
t0?: number;
|
|
14
|
+
t1?: number;
|
|
15
|
+
t2?: number;
|
|
16
|
+
t3?: number;
|
|
17
|
+
m0?: number;
|
|
18
|
+
m1?: number;
|
|
19
|
+
en?: number;
|
|
20
|
+
e1?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Map base10 int colors to hex color strings
|
|
24
|
+
* @param colors color map
|
|
25
|
+
*/
|
|
26
|
+
declare const mapToHex: (colors: ProfileRawColors) => RawColors;
|
|
27
|
+
/**
|
|
28
|
+
* Find an item by Item#uniqueName
|
|
29
|
+
* @param {string} name string with which to query
|
|
30
|
+
* @param {string} locale locale to use for internationalization
|
|
31
|
+
* @returns {Item}
|
|
32
|
+
*/
|
|
33
|
+
declare const find: (name: string, locale?: string) => Item;
|
|
34
|
+
declare const numberToLetter: (num: number) => string;
|
|
35
|
+
//#endregion
|
|
2
36
|
export { ProfileRawColors, RawDate, RawId, find, mapToHex, numberToLetter };
|
package/dist/Utils.mjs
CHANGED
|
@@ -1,3 +1,60 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Items from "@wfcd/items";
|
|
2
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 {string} name string with which to query
|
|
30
|
+
* @param {string} locale locale to use for internationalization
|
|
31
|
+
* @returns {Item}
|
|
32
|
+
*/
|
|
33
|
+
const find = (name, locale = "en") => {
|
|
34
|
+
const item = new Items({
|
|
35
|
+
category: categories,
|
|
36
|
+
i18n: [locale],
|
|
37
|
+
i18nOnObject: true
|
|
38
|
+
}).find((i) => i.uniqueName === name);
|
|
39
|
+
let itemClone = { ...item };
|
|
40
|
+
if (locale !== "en" && itemClone.i18n?.[locale]) {
|
|
41
|
+
itemClone = {
|
|
42
|
+
...itemClone,
|
|
43
|
+
...itemClone.i18n[locale]
|
|
44
|
+
};
|
|
45
|
+
const warframe = itemClone;
|
|
46
|
+
if (warframe.abilities) warframe.abilities = warframe.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
|
|
3
60
|
export { find, mapToHex, numberToLetter };
|
package/dist/Weapon.d.mts
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
|
|
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
|
|
2
32
|
export { RawWeapon, Weapon as default };
|
package/dist/Weapon.mjs
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
-
|
|
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
|
+
};
|
|
2
62
|
|
|
63
|
+
//#endregion
|
|
3
64
|
export { Weapon as default };
|
package/dist/XpInfo.d.mts
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
34
|
export { RawXpItem, XpInfo as default };
|