@wfcd/profile-parser 2.0.0 → 2.0.2
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 +5 -5
- 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,15 @@
|
|
|
1
|
+
import "./ChallengeProgress-B8Kv32oi.js";
|
|
2
|
+
import "./Intrinsics-azrsOZJd.js";
|
|
3
|
+
import "./Skin-BbUkegH1.js";
|
|
4
|
+
import "./Utils-C7BZqK4e.js";
|
|
5
|
+
import "./ItemConfig-7as-gjPG.js";
|
|
6
|
+
import "./Polarity-DDWqEVm2.js";
|
|
7
|
+
import "./LoadOutItem-BlRFZMNd.js";
|
|
8
|
+
import "./XpInfo-ChJ_lJaH.js";
|
|
9
|
+
import "./LoadOutInventory-BsPRtXfG.js";
|
|
10
|
+
import "./LoadOutPreset-BshJF0LH.js";
|
|
11
|
+
import "./Mission-BZgLMluh.js";
|
|
12
|
+
import "./OperatorLoadOuts-Dk2uMwby.js";
|
|
13
|
+
import "./Syndicate-FSUt1PP5.js";
|
|
14
|
+
import { Profile, RawProfile } from "./Profile-rva_Xss5.js";
|
|
15
|
+
export { RawProfile, Profile as default };
|
package/dist/Profile.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./ChallengeProgress-DKKtijWw.js";
|
|
2
|
+
import "./Intrinsics-CqFOpLxp.js";
|
|
3
|
+
import "./Utils-C3kZCO6a.js";
|
|
4
|
+
import "./Skin-D6v6jC9U.js";
|
|
5
|
+
import "./ItemConfig-uU36aJFJ.js";
|
|
6
|
+
import "./Polarity--RYq3iwF.js";
|
|
7
|
+
import "./LoadOutItem-B_6G9dXC.js";
|
|
8
|
+
import "./XpInfo-CXC3I0NQ.js";
|
|
9
|
+
import "./LoadOutInventory-CPVZJ_W5.js";
|
|
10
|
+
import "./LoadOutPreset-CMbZo-II.js";
|
|
11
|
+
import "./Mission-D2n1i5R2.js";
|
|
12
|
+
import "./OperatorLoadOuts-B8bEy2dp.js";
|
|
13
|
+
import "./Syndicate-CjUKKAsk.js";
|
|
14
|
+
import { Profile } from "./Profile-WWZ2BDf0.js";
|
|
15
|
+
|
|
16
|
+
export { Profile as default };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import "./Ability-DzKgEG5R.js";
|
|
2
|
+
import "./ChallengeProgress-B8Kv32oi.js";
|
|
3
|
+
import "./Enemy-toy1Spyi.js";
|
|
4
|
+
import "./Intrinsics-azrsOZJd.js";
|
|
5
|
+
import "./Skin-BbUkegH1.js";
|
|
6
|
+
import { RawDate } from "./Utils-C7BZqK4e.js";
|
|
7
|
+
import "./ItemConfig-7as-gjPG.js";
|
|
8
|
+
import "./Polarity-DDWqEVm2.js";
|
|
9
|
+
import "./LoadOutItem-BlRFZMNd.js";
|
|
10
|
+
import "./XpInfo-ChJ_lJaH.js";
|
|
11
|
+
import "./LoadOutInventory-BsPRtXfG.js";
|
|
12
|
+
import "./LoadOutPreset-BshJF0LH.js";
|
|
13
|
+
import "./Mission-BZgLMluh.js";
|
|
14
|
+
import "./OperatorLoadOuts-Dk2uMwby.js";
|
|
15
|
+
import "./Syndicate-FSUt1PP5.js";
|
|
16
|
+
import { Profile, RawProfile } from "./Profile-rva_Xss5.js";
|
|
17
|
+
import "./Pvp-Cb1KNKvw.js";
|
|
18
|
+
import "./Race-DCxzjMpC.js";
|
|
19
|
+
import "./Scan-BWfZiLoW.js";
|
|
20
|
+
import "./Weapon-DAJp-nbn.js";
|
|
21
|
+
import { RawStats, Stats } from "./Stats-DtkR2w1A.js";
|
|
22
|
+
import { Locale } from "warframe-worldstate-data";
|
|
23
|
+
|
|
24
|
+
//#region src/ProfileParser.d.ts
|
|
25
|
+
interface ProfileData {
|
|
26
|
+
Results: RawProfile[];
|
|
27
|
+
TechProjects?: any;
|
|
28
|
+
XpCompoents?: any;
|
|
29
|
+
XpCacheExpiryDate?: RawDate;
|
|
30
|
+
CeremonyResetDate?: RawDate;
|
|
31
|
+
Stats: RawStats;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Parser entry point
|
|
35
|
+
* @module
|
|
36
|
+
*/
|
|
37
|
+
declare class ProfileParser {
|
|
38
|
+
/**
|
|
39
|
+
* Player's profile
|
|
40
|
+
*/
|
|
41
|
+
profile: Profile;
|
|
42
|
+
/**
|
|
43
|
+
* N/A
|
|
44
|
+
*/
|
|
45
|
+
techProjects: any;
|
|
46
|
+
/**
|
|
47
|
+
* N/A
|
|
48
|
+
*/
|
|
49
|
+
xpComponents: any;
|
|
50
|
+
/**
|
|
51
|
+
* N/A
|
|
52
|
+
*/
|
|
53
|
+
xpCacheExpiryDate: Date;
|
|
54
|
+
/**
|
|
55
|
+
* N/A
|
|
56
|
+
*/
|
|
57
|
+
ceremonyResetDate: Date;
|
|
58
|
+
/**
|
|
59
|
+
* Player stats
|
|
60
|
+
*/
|
|
61
|
+
stats: Stats;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @param {Object} data The data returned by getProfile endpoint
|
|
65
|
+
* @param {string} locale The locale to return where possible
|
|
66
|
+
* @param {boolean} [withItem=false] Whether or not to include items
|
|
67
|
+
*/
|
|
68
|
+
constructor(data: ProfileData, locale?: Locale, withItem?: boolean);
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { ProfileParser as default };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import "./Ability-D1F1s_19.js";
|
|
2
|
+
import "./ChallengeProgress-DKKtijWw.js";
|
|
3
|
+
import "./Enemy-BqxhFdkB.js";
|
|
4
|
+
import "./Intrinsics-CqFOpLxp.js";
|
|
5
|
+
import "./Utils-C3kZCO6a.js";
|
|
6
|
+
import "./Skin-D6v6jC9U.js";
|
|
7
|
+
import "./ItemConfig-uU36aJFJ.js";
|
|
8
|
+
import "./Polarity--RYq3iwF.js";
|
|
9
|
+
import "./LoadOutItem-B_6G9dXC.js";
|
|
10
|
+
import "./XpInfo-CXC3I0NQ.js";
|
|
11
|
+
import "./LoadOutInventory-CPVZJ_W5.js";
|
|
12
|
+
import "./LoadOutPreset-CMbZo-II.js";
|
|
13
|
+
import "./Mission-D2n1i5R2.js";
|
|
14
|
+
import "./OperatorLoadOuts-B8bEy2dp.js";
|
|
15
|
+
import "./Syndicate-CjUKKAsk.js";
|
|
16
|
+
import { Profile } from "./Profile-WWZ2BDf0.js";
|
|
17
|
+
import "./Pvp-hyzYfVBB.js";
|
|
18
|
+
import "./Race-5Q0StEkE.js";
|
|
19
|
+
import "./Scan-Dlrv6viG.js";
|
|
20
|
+
import "./Weapon-4KlXEHQF.js";
|
|
21
|
+
import { Stats } from "./Stats-Bm1bpQe5.js";
|
|
22
|
+
import { parseDate } from "warframe-worldstate-data/utilities";
|
|
23
|
+
|
|
24
|
+
//#region src/ProfileParser.ts
|
|
25
|
+
/**
|
|
26
|
+
* Parser entry point
|
|
27
|
+
* @module
|
|
28
|
+
*/
|
|
29
|
+
var ProfileParser = class {
|
|
30
|
+
/**
|
|
31
|
+
* Player's profile
|
|
32
|
+
*/
|
|
33
|
+
profile;
|
|
34
|
+
/**
|
|
35
|
+
* N/A
|
|
36
|
+
*/
|
|
37
|
+
techProjects;
|
|
38
|
+
/**
|
|
39
|
+
* N/A
|
|
40
|
+
*/
|
|
41
|
+
xpComponents;
|
|
42
|
+
/**
|
|
43
|
+
* N/A
|
|
44
|
+
*/
|
|
45
|
+
xpCacheExpiryDate;
|
|
46
|
+
/**
|
|
47
|
+
* N/A
|
|
48
|
+
*/
|
|
49
|
+
ceremonyResetDate;
|
|
50
|
+
/**
|
|
51
|
+
* Player stats
|
|
52
|
+
*/
|
|
53
|
+
stats;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param {Object} data The data returned by getProfile endpoint
|
|
57
|
+
* @param {string} locale The locale to return where possible
|
|
58
|
+
* @param {boolean} [withItem=false] Whether or not to include items
|
|
59
|
+
*/
|
|
60
|
+
constructor(data, locale = "en", withItem = false) {
|
|
61
|
+
this.profile = new Profile(data.Results[0], locale, withItem);
|
|
62
|
+
this.techProjects = data.TechProjects;
|
|
63
|
+
this.xpComponents = data.XpCompoents;
|
|
64
|
+
this.xpCacheExpiryDate = parseDate(data.XpCacheExpiryDate);
|
|
65
|
+
this.ceremonyResetDate = parseDate(data.CeremonyResetDate);
|
|
66
|
+
this.stats = new Stats(data.Stats);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { ProfileParser as default };
|
|
@@ -1,43 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Pvp.d.ts
|
|
2
|
+
interface RawPvp {
|
|
2
3
|
type: string;
|
|
3
4
|
suitDeaths?: number;
|
|
4
5
|
suitKills?: number;
|
|
5
6
|
weaponKills?: number;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
8
|
/**
|
|
9
9
|
* Player's conclave stats
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
declare class Pvp {
|
|
13
13
|
/**
|
|
14
14
|
* PVP match unique name
|
|
15
15
|
*/
|
|
16
16
|
uniqueName: string;
|
|
17
|
-
|
|
18
17
|
/**
|
|
19
18
|
* Deaths for this match
|
|
20
19
|
*/
|
|
21
20
|
warframeDeaths?: number;
|
|
22
|
-
|
|
23
21
|
/**
|
|
24
22
|
* Warframe kills
|
|
25
23
|
*/
|
|
26
24
|
warframeKills?: number;
|
|
27
|
-
|
|
28
25
|
/**
|
|
29
26
|
* Weapon killes
|
|
30
27
|
*/
|
|
31
28
|
weaponKills?: number;
|
|
32
|
-
|
|
33
29
|
/**
|
|
34
30
|
*
|
|
35
31
|
* @param {Object} pvp PVP data to parse
|
|
36
32
|
*/
|
|
37
|
-
constructor(pvp: RawPvp)
|
|
38
|
-
this.uniqueName = pvp.type;
|
|
39
|
-
this.warframeDeaths = pvp.suitDeaths;
|
|
40
|
-
this.warframeKills = pvp.suitKills;
|
|
41
|
-
this.weaponKills = pvp.weaponKills;
|
|
42
|
-
}
|
|
33
|
+
constructor(pvp: RawPvp);
|
|
43
34
|
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Pvp, RawPvp };
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
};
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Pvp };
|
package/dist/Pvp.d.ts
ADDED
package/dist/Pvp.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { Race };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/Race.d.ts
|
|
2
|
+
type RawRace = Record<string, {
|
|
3
|
+
highScore: number;
|
|
4
|
+
}>;
|
|
4
5
|
/**
|
|
5
6
|
* Represents a k-drive race
|
|
6
7
|
* @module
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
declare class Race {
|
|
9
10
|
/**
|
|
10
11
|
* Race name
|
|
11
12
|
*/
|
|
@@ -14,23 +15,18 @@ export default class Race {
|
|
|
14
15
|
* Race High score
|
|
15
16
|
*/
|
|
16
17
|
highScore: number;
|
|
17
|
-
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
20
20
|
* @param type Race name
|
|
21
21
|
* @param highScore high score
|
|
22
22
|
*/
|
|
23
|
-
constructor(type: string, highScore: number)
|
|
24
|
-
this.uniqueName = type;
|
|
25
|
-
this.highScore = highScore;
|
|
26
|
-
}
|
|
27
|
-
|
|
23
|
+
constructor(type: string, highScore: number);
|
|
28
24
|
/**
|
|
29
25
|
* Created an array of Race objects from DE's Races array
|
|
30
26
|
* @param races Array of races
|
|
31
27
|
* @returns {Race[]} An array of races formatted in a more consumable way.
|
|
32
28
|
*/
|
|
33
|
-
static fromRaceObject(races: RawRace)
|
|
34
|
-
return Object.entries(races ?? {}).map(([type, { highScore }]) => new Race(type, highScore));
|
|
35
|
-
}
|
|
29
|
+
static fromRaceObject(races: RawRace): Race[];
|
|
36
30
|
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Race, RawRace };
|
package/dist/Race.d.ts
ADDED
package/dist/Race.js
ADDED
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/Scan.d.ts
|
|
2
|
+
interface RawScan {
|
|
2
3
|
type: string;
|
|
3
4
|
scans: number;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
6
|
/**
|
|
7
7
|
* Represents an enemy scanned to the codex
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
declare class Scan {
|
|
11
11
|
/**
|
|
12
12
|
* Enemy unique name
|
|
13
13
|
* @type {String}
|
|
14
14
|
*/
|
|
15
15
|
uniqueName: string;
|
|
16
|
-
|
|
17
16
|
/**
|
|
18
17
|
* Number of scans done
|
|
19
18
|
* @type {number}
|
|
20
19
|
*/
|
|
21
20
|
scans: number;
|
|
22
|
-
|
|
23
21
|
/**
|
|
24
22
|
* @param {Object} scan The scanned Warframe object
|
|
25
23
|
*/
|
|
26
|
-
constructor(scan: RawScan)
|
|
27
|
-
this.uniqueName = scan.type;
|
|
28
|
-
this.scans = scan.scans;
|
|
29
|
-
}
|
|
24
|
+
constructor(scan: RawScan);
|
|
30
25
|
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { RawScan, Scan };
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Scan };
|
package/dist/Scan.d.ts
ADDED
package/dist/Scan.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
28
|
+
export { RawSkin, Skin, WeaponSkin };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { find } from "./Utils-C3kZCO6a.js";
|
|
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
|
|
36
|
+
export { Skin, WeaponSkin };
|
package/dist/Skin.d.ts
ADDED
package/dist/Skin.js
ADDED