@wise-old-man/utils 2.1.6 → 2.1.8
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/index.d.ts +57 -1
- package/dist/index.js +27 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -56,9 +56,11 @@ export type Prisma_Base_Delta = {
|
|
|
56
56
|
construction: number
|
|
57
57
|
abyssal_sire: number
|
|
58
58
|
alchemical_hydra: number
|
|
59
|
+
artio: number
|
|
59
60
|
barrows_chests: number
|
|
60
61
|
bryophyta: number
|
|
61
62
|
callisto: number
|
|
63
|
+
calvarion: number
|
|
62
64
|
cerberus: number
|
|
63
65
|
chambers_of_xeric: number
|
|
64
66
|
chambers_of_xeric_challenge_mode: number
|
|
@@ -89,6 +91,7 @@ export type Prisma_Base_Delta = {
|
|
|
89
91
|
sarachnis: number
|
|
90
92
|
scorpia: number
|
|
91
93
|
skotizo: number
|
|
94
|
+
spindel: number
|
|
92
95
|
tempoross: number
|
|
93
96
|
the_gauntlet: number
|
|
94
97
|
the_corrupted_gauntlet: number
|
|
@@ -176,6 +179,7 @@ export type Prisma_Base_Player = {
|
|
|
176
179
|
displayName: string
|
|
177
180
|
type: PlayerType
|
|
178
181
|
build: PlayerBuild
|
|
182
|
+
status: PlayerStatus
|
|
179
183
|
country: Country | null
|
|
180
184
|
flagged: boolean
|
|
181
185
|
exp: bigint
|
|
@@ -191,6 +195,14 @@ export type Prisma_Base_Player = {
|
|
|
191
195
|
}
|
|
192
196
|
|
|
193
197
|
|
|
198
|
+
export type PlayerArchive = {
|
|
199
|
+
playerId: number
|
|
200
|
+
previousUsername: string
|
|
201
|
+
archiveUsername: string
|
|
202
|
+
createdAt: Date
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
194
206
|
export type Prisma_Base_Record = {
|
|
195
207
|
id: number
|
|
196
208
|
playerId: number
|
|
@@ -282,6 +294,8 @@ export type Prisma_Base_Snapshot = {
|
|
|
282
294
|
abyssal_sireKills: number
|
|
283
295
|
alchemical_hydraRank: number
|
|
284
296
|
alchemical_hydraKills: number
|
|
297
|
+
artioRank: number
|
|
298
|
+
artioKills: number
|
|
285
299
|
barrows_chestsRank: number
|
|
286
300
|
barrows_chestsKills: number
|
|
287
301
|
bryophytaKills: number
|
|
@@ -291,6 +305,8 @@ export type Prisma_Base_Snapshot = {
|
|
|
291
305
|
cerberusRank: number
|
|
292
306
|
callistoRank: number
|
|
293
307
|
callistoKills: number
|
|
308
|
+
calvarionRank: number
|
|
309
|
+
calvarionKills: number
|
|
294
310
|
chambers_of_xericKills: number
|
|
295
311
|
chambers_of_xeric_challenge_modeRank: number
|
|
296
312
|
chambers_of_xeric_challenge_modeKills: number
|
|
@@ -344,6 +360,8 @@ export type Prisma_Base_Snapshot = {
|
|
|
344
360
|
scorpiaKills: number
|
|
345
361
|
skotizoRank: number
|
|
346
362
|
skotizoKills: number
|
|
363
|
+
spindelRank: number
|
|
364
|
+
spindelKills: number
|
|
347
365
|
the_gauntletRank: number
|
|
348
366
|
the_gauntletKills: number
|
|
349
367
|
the_corrupted_gauntletKills: number
|
|
@@ -483,9 +501,11 @@ declare type Activity = typeof Activity[keyof typeof Activity];
|
|
|
483
501
|
declare const Boss: {
|
|
484
502
|
readonly ABYSSAL_SIRE: "abyssal_sire";
|
|
485
503
|
readonly ALCHEMICAL_HYDRA: "alchemical_hydra";
|
|
504
|
+
readonly ARTIO: "artio";
|
|
486
505
|
readonly BARROWS_CHESTS: "barrows_chests";
|
|
487
506
|
readonly BRYOPHYTA: "bryophyta";
|
|
488
507
|
readonly CALLISTO: "callisto";
|
|
508
|
+
readonly CALVARION: "calvarion";
|
|
489
509
|
readonly CERBERUS: "cerberus";
|
|
490
510
|
readonly CHAMBERS_OF_XERIC: "chambers_of_xeric";
|
|
491
511
|
readonly CHAMBERS_OF_XERIC_CM: "chambers_of_xeric_challenge_mode";
|
|
@@ -516,6 +536,7 @@ declare const Boss: {
|
|
|
516
536
|
readonly SARACHNIS: "sarachnis";
|
|
517
537
|
readonly SCORPIA: "scorpia";
|
|
518
538
|
readonly SKOTIZO: "skotizo";
|
|
539
|
+
readonly SPINDEL: "spindel";
|
|
519
540
|
readonly TEMPOROSS: "tempoross";
|
|
520
541
|
readonly THE_GAUNTLET: "the_gauntlet";
|
|
521
542
|
readonly THE_CORRUPTED_GAUNTLET: "the_corrupted_gauntlet";
|
|
@@ -544,9 +565,11 @@ declare const Metric: {
|
|
|
544
565
|
readonly EHB: "ehb";
|
|
545
566
|
readonly ABYSSAL_SIRE: "abyssal_sire";
|
|
546
567
|
readonly ALCHEMICAL_HYDRA: "alchemical_hydra";
|
|
568
|
+
readonly ARTIO: "artio";
|
|
547
569
|
readonly BARROWS_CHESTS: "barrows_chests";
|
|
548
570
|
readonly BRYOPHYTA: "bryophyta";
|
|
549
571
|
readonly CALLISTO: "callisto";
|
|
572
|
+
readonly CALVARION: "calvarion";
|
|
550
573
|
readonly CERBERUS: "cerberus";
|
|
551
574
|
readonly CHAMBERS_OF_XERIC: "chambers_of_xeric";
|
|
552
575
|
readonly CHAMBERS_OF_XERIC_CM: "chambers_of_xeric_challenge_mode";
|
|
@@ -577,6 +600,7 @@ declare const Metric: {
|
|
|
577
600
|
readonly SARACHNIS: "sarachnis";
|
|
578
601
|
readonly SCORPIA: "scorpia";
|
|
579
602
|
readonly SKOTIZO: "skotizo";
|
|
603
|
+
readonly SPINDEL: "spindel";
|
|
580
604
|
readonly TEMPOROSS: "tempoross";
|
|
581
605
|
readonly THE_GAUNTLET: "the_gauntlet";
|
|
582
606
|
readonly THE_CORRUPTED_GAUNTLET: "the_corrupted_gauntlet";
|
|
@@ -665,6 +689,13 @@ declare const PlayerBuild: {
|
|
|
665
689
|
readonly HP10: "hp10";
|
|
666
690
|
};
|
|
667
691
|
declare type PlayerBuild = typeof PlayerBuild[keyof typeof PlayerBuild];
|
|
692
|
+
declare const PlayerStatus: {
|
|
693
|
+
readonly ACTIVE: "active";
|
|
694
|
+
readonly UNRANKED: "unranked";
|
|
695
|
+
readonly FLAGGED: "flagged";
|
|
696
|
+
readonly ARCHIVED: "archived";
|
|
697
|
+
};
|
|
698
|
+
declare type PlayerStatus = typeof PlayerStatus[keyof typeof PlayerStatus];
|
|
668
699
|
declare const CompetitionType: {
|
|
669
700
|
readonly CLASSIC: "classic";
|
|
670
701
|
readonly TEAM: "team";
|
|
@@ -1510,6 +1541,23 @@ interface PlayerDetails extends Player {
|
|
|
1510
1541
|
combatLevel: number;
|
|
1511
1542
|
latestSnapshot: FormattedSnapshot;
|
|
1512
1543
|
}
|
|
1544
|
+
interface FlaggedPlayerReviewContext {
|
|
1545
|
+
previous: FormattedSnapshot;
|
|
1546
|
+
rejected: FormattedSnapshot;
|
|
1547
|
+
negativeGains: boolean;
|
|
1548
|
+
excessiveGains: boolean;
|
|
1549
|
+
possibleRollback: boolean;
|
|
1550
|
+
excessiveGainsReversed: boolean;
|
|
1551
|
+
data: {
|
|
1552
|
+
stackableGainedRatio: number;
|
|
1553
|
+
previousEHP: number;
|
|
1554
|
+
previousEHB: number;
|
|
1555
|
+
previousRank: number;
|
|
1556
|
+
rejectedEHP: number;
|
|
1557
|
+
rejectedEHB: number;
|
|
1558
|
+
rejectedRank: number;
|
|
1559
|
+
};
|
|
1560
|
+
}
|
|
1513
1561
|
|
|
1514
1562
|
declare type RecordLeaderboardEntry = Record & {
|
|
1515
1563
|
player: Player;
|
|
@@ -1621,9 +1669,11 @@ declare const MetricProps: {
|
|
|
1621
1669
|
readonly guardians_of_the_rift: ActivityProperties;
|
|
1622
1670
|
readonly abyssal_sire: BossProperties;
|
|
1623
1671
|
readonly alchemical_hydra: BossProperties;
|
|
1672
|
+
readonly artio: BossProperties;
|
|
1624
1673
|
readonly barrows_chests: BossProperties;
|
|
1625
1674
|
readonly bryophyta: BossProperties;
|
|
1626
1675
|
readonly callisto: BossProperties;
|
|
1676
|
+
readonly calvarion: BossProperties;
|
|
1627
1677
|
readonly cerberus: BossProperties;
|
|
1628
1678
|
readonly chambers_of_xeric: BossProperties;
|
|
1629
1679
|
readonly chambers_of_xeric_challenge_mode: BossProperties;
|
|
@@ -1654,6 +1704,7 @@ declare const MetricProps: {
|
|
|
1654
1704
|
readonly sarachnis: BossProperties;
|
|
1655
1705
|
readonly scorpia: BossProperties;
|
|
1656
1706
|
readonly skotizo: BossProperties;
|
|
1707
|
+
readonly spindel: BossProperties;
|
|
1657
1708
|
readonly tempoross: BossProperties;
|
|
1658
1709
|
readonly the_gauntlet: BossProperties;
|
|
1659
1710
|
readonly the_corrupted_gauntlet: BossProperties;
|
|
@@ -1738,10 +1789,15 @@ declare const PlayerTypeProps: MapOf<PlayerType, {
|
|
|
1738
1789
|
declare const PlayerBuildProps: MapOf<PlayerBuild, {
|
|
1739
1790
|
name: string;
|
|
1740
1791
|
}>;
|
|
1792
|
+
declare const PlayerStatusProps: MapOf<PlayerStatus, {
|
|
1793
|
+
name: string;
|
|
1794
|
+
}>;
|
|
1741
1795
|
declare const PLAYER_TYPES: ("unknown" | "regular" | "ironman" | "hardcore" | "ultimate" | "fresh_start")[];
|
|
1742
1796
|
declare const PLAYER_BUILDS: ("main" | "f2p" | "lvl3" | "zerker" | "def1" | "hp10")[];
|
|
1797
|
+
declare const PLAYER_STATUSES: ("active" | "unranked" | "flagged" | "archived")[];
|
|
1743
1798
|
declare function isPlayerType(typeString: string): typeString is PlayerType;
|
|
1744
1799
|
declare function isPlayerBuild(buildString: string): buildString is PlayerBuild;
|
|
1800
|
+
declare function isPlayerStatus(statusString: string): statusString is PlayerStatus;
|
|
1745
1801
|
declare function findPlayerType(typeName: string): PlayerType | null;
|
|
1746
1802
|
declare function findPlayerBuild(buildName: string): PlayerBuild | null;
|
|
1747
1803
|
|
|
@@ -2176,4 +2232,4 @@ declare class WOMClient {
|
|
|
2176
2232
|
constructor(options?: WOMClientOptions);
|
|
2177
2233
|
}
|
|
2178
2234
|
|
|
2179
|
-
export { ACTIVITIES, Achievement, AchievementDefinition, AchievementProgress, AchievementTemplate, Activity, ActivityDelta, ActivityValue, ActivityValueWithPlayer, AlgorithmCache, AssertPlayerTypeResponse, BOSSES, Bonus, BonusType, Boss, BossDelta, BossMetaConfig, BossValue, BossValueWithPlayer, CAPPED_MAX_TOTAL_XP, CMLGroupData, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, ChangeMemberRolePayload, CompetitionDetails, CompetitionListItem, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, CompetitionWithParticipations, CompetitionsSearchFilter, ComputedMetric, ComputedMetricDelta, ComputedMetricValue, ComputedMetricValueWithPlayer, Country, CountryDetails, CountryProps, CreateCompetitionPayload, CreateCompetitionResponse, CreateGroupPayload, CreateGroupResponse, DeltaLeaderboardEntry, DeltaLeaderboardFilter, EditCompetitionPayload, EditGroupPayload, EfficiencyAlgorithm, EfficiencyAlgorithmType, EfficiencyAlgorithmTypeUnion, EfficiencyLeaderboardsFilter, EfficiencyMap, ExperienceMap, ExtendedAchievement, ExtendedAchievementWithPlayer, F2P_BOSSES, FormattedSnapshot, GROUP_ROLES, GenericCountMessageResponse, GenericMessageResponse, GetGroupGainsFilter, GetPlayerGainsResponse, GroupDetails, GroupHiscoresActivityItem, GroupHiscoresBossItem, GroupHiscoresComputedMetricItem, GroupHiscoresEntry, GroupHiscoresSkillItem, GroupListItem, GroupMemberFragment, GroupRecordsFilter, GroupRole, GroupRoleProps, GroupStatistics, KillcountMap, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, MapOf, MeasuredDeltaProgress, MemberInput, MembershipWithGroup, MembershipWithPlayer, Metric, MetricLeaders, MetricMeasure, MetricProps, MetricType, MetricValueKey, MigrationDataSource, NameChangeDetails, NameChangeStatus, NameChangesSearchFilter, PERIODS, PLAYER_BUILDS, PLAYER_TYPES, PRIVELEGED_GROUP_ROLES, ParticipationWithCompetition, ParticipationWithCompetitionAndStandings, ParticipationWithPlayer, ParticipationWithPlayerAndProgress, Period, PeriodProps, Player, PlayerBuild, PlayerBuildProps, PlayerCompetitionStandingsFilter, PlayerCompetitionsFilter, PlayerDeltasArray, PlayerDeltasMap, PlayerDetails, PlayerRecordsFilter, PlayerType, PlayerTypeProps, REAL_SKILLS, Record, RecordLeaderboardEntry, RecordLeaderboardFilter, SKILLS, SKILL_EXP_AT_99, Skill, SkillDelta, SkillMetaConfig, SkillMetaMethod, SkillValue, SkillValueWithPlayer, Snapshot, SnapshotDataSource, SnapshotFragment, Team, TempleGroupData, TimeRangeFilter, Top5ProgressResult, WOMClient, findCountry, findCountryByCode, findCountryByName, findGroupRole, findMetric, findPeriod, findPlayerBuild, findPlayerType, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMetricMeasure, getMetricName, getMetricRankKey, getMetricValueKey, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isCompetitionStatus, isCompetitionType, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerType, isSkill, padNumber, parseMetricAbbreviation, parsePeriodExpression, round };
|
|
2235
|
+
export { ACTIVITIES, Achievement, AchievementDefinition, AchievementProgress, AchievementTemplate, Activity, ActivityDelta, ActivityValue, ActivityValueWithPlayer, AlgorithmCache, AssertPlayerTypeResponse, BOSSES, Bonus, BonusType, Boss, BossDelta, BossMetaConfig, BossValue, BossValueWithPlayer, CAPPED_MAX_TOTAL_XP, CMLGroupData, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, ChangeMemberRolePayload, CompetitionDetails, CompetitionListItem, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, CompetitionWithParticipations, CompetitionsSearchFilter, ComputedMetric, ComputedMetricDelta, ComputedMetricValue, ComputedMetricValueWithPlayer, Country, CountryDetails, CountryProps, CreateCompetitionPayload, CreateCompetitionResponse, CreateGroupPayload, CreateGroupResponse, DeltaLeaderboardEntry, DeltaLeaderboardFilter, EditCompetitionPayload, EditGroupPayload, EfficiencyAlgorithm, EfficiencyAlgorithmType, EfficiencyAlgorithmTypeUnion, EfficiencyLeaderboardsFilter, EfficiencyMap, ExperienceMap, ExtendedAchievement, ExtendedAchievementWithPlayer, F2P_BOSSES, FlaggedPlayerReviewContext, FormattedSnapshot, GROUP_ROLES, GenericCountMessageResponse, GenericMessageResponse, GetGroupGainsFilter, GetPlayerGainsResponse, GroupDetails, GroupHiscoresActivityItem, GroupHiscoresBossItem, GroupHiscoresComputedMetricItem, GroupHiscoresEntry, GroupHiscoresSkillItem, GroupListItem, GroupMemberFragment, GroupRecordsFilter, GroupRole, GroupRoleProps, GroupStatistics, KillcountMap, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, MapOf, MeasuredDeltaProgress, MemberInput, MembershipWithGroup, MembershipWithPlayer, Metric, MetricLeaders, MetricMeasure, MetricProps, MetricType, MetricValueKey, MigrationDataSource, NameChangeDetails, NameChangeStatus, NameChangesSearchFilter, PERIODS, PLAYER_BUILDS, PLAYER_STATUSES, PLAYER_TYPES, PRIVELEGED_GROUP_ROLES, ParticipationWithCompetition, ParticipationWithCompetitionAndStandings, ParticipationWithPlayer, ParticipationWithPlayerAndProgress, Period, PeriodProps, Player, PlayerBuild, PlayerBuildProps, PlayerCompetitionStandingsFilter, PlayerCompetitionsFilter, PlayerDeltasArray, PlayerDeltasMap, PlayerDetails, PlayerRecordsFilter, PlayerStatus, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_SKILLS, Record, RecordLeaderboardEntry, RecordLeaderboardFilter, SKILLS, SKILL_EXP_AT_99, Skill, SkillDelta, SkillMetaConfig, SkillMetaMethod, SkillValue, SkillValueWithPlayer, Snapshot, SnapshotDataSource, SnapshotFragment, Team, TempleGroupData, TimeRangeFilter, Top5ProgressResult, WOMClient, findCountry, findCountryByCode, findCountryByName, findGroupRole, findMetric, findPeriod, findPlayerBuild, findPlayerType, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMetricMeasure, getMetricName, getMetricRankKey, getMetricValueKey, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isCompetitionStatus, isCompetitionType, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill, padNumber, parseMetricAbbreviation, parsePeriodExpression, round };
|
package/dist/index.js
CHANGED
|
@@ -513,9 +513,11 @@ const Activity = {
|
|
|
513
513
|
const Boss = {
|
|
514
514
|
ABYSSAL_SIRE: 'abyssal_sire',
|
|
515
515
|
ALCHEMICAL_HYDRA: 'alchemical_hydra',
|
|
516
|
+
ARTIO: 'artio',
|
|
516
517
|
BARROWS_CHESTS: 'barrows_chests',
|
|
517
518
|
BRYOPHYTA: 'bryophyta',
|
|
518
519
|
CALLISTO: 'callisto',
|
|
520
|
+
CALVARION: 'calvarion',
|
|
519
521
|
CERBERUS: 'cerberus',
|
|
520
522
|
CHAMBERS_OF_XERIC: 'chambers_of_xeric',
|
|
521
523
|
CHAMBERS_OF_XERIC_CM: 'chambers_of_xeric_challenge_mode',
|
|
@@ -546,6 +548,7 @@ const Boss = {
|
|
|
546
548
|
SARACHNIS: 'sarachnis',
|
|
547
549
|
SCORPIA: 'scorpia',
|
|
548
550
|
SKOTIZO: 'skotizo',
|
|
551
|
+
SPINDEL: 'spindel',
|
|
549
552
|
TEMPOROSS: 'tempoross',
|
|
550
553
|
THE_GAUNTLET: 'the_gauntlet',
|
|
551
554
|
THE_CORRUPTED_GAUNTLET: 'the_corrupted_gauntlet',
|
|
@@ -596,6 +599,12 @@ const PlayerBuild = {
|
|
|
596
599
|
DEF1: 'def1',
|
|
597
600
|
HP10: 'hp10'
|
|
598
601
|
};
|
|
602
|
+
const PlayerStatus = {
|
|
603
|
+
ACTIVE: 'active',
|
|
604
|
+
UNRANKED: 'unranked',
|
|
605
|
+
FLAGGED: 'flagged',
|
|
606
|
+
ARCHIVED: 'archived'
|
|
607
|
+
};
|
|
599
608
|
const CompetitionType = {
|
|
600
609
|
CLASSIC: 'classic',
|
|
601
610
|
TEAM: 'team'
|
|
@@ -1813,9 +1822,11 @@ const SkillProps = lodash.mapValues({
|
|
|
1813
1822
|
const BossProps = lodash.mapValues({
|
|
1814
1823
|
[Boss.ABYSSAL_SIRE]: { name: 'Abyssal Sire' },
|
|
1815
1824
|
[Boss.ALCHEMICAL_HYDRA]: { name: 'Alchemical Hydra' },
|
|
1825
|
+
[Boss.ARTIO]: { name: 'Artio' },
|
|
1816
1826
|
[Boss.BARROWS_CHESTS]: { name: 'Barrows Chests' },
|
|
1817
1827
|
[Boss.BRYOPHYTA]: { name: 'Bryophyta', minimumValue: 5, isMembers: false },
|
|
1818
1828
|
[Boss.CALLISTO]: { name: 'Callisto' },
|
|
1829
|
+
[Boss.CALVARION]: { name: "Calvar'ion" },
|
|
1819
1830
|
[Boss.CERBERUS]: { name: 'Cerberus' },
|
|
1820
1831
|
[Boss.CHAMBERS_OF_XERIC]: { name: 'Chambers Of Xeric' },
|
|
1821
1832
|
[Boss.CHAMBERS_OF_XERIC_CM]: { name: 'Chambers Of Xeric (CM)', minimumValue: 5 },
|
|
@@ -1844,8 +1855,9 @@ const BossProps = lodash.mapValues({
|
|
|
1844
1855
|
[Boss.OBOR]: { name: 'Obor', minimumValue: 5, isMembers: false },
|
|
1845
1856
|
[Boss.PHANTOM_MUSPAH]: { name: 'Phantom Muspah' },
|
|
1846
1857
|
[Boss.SARACHNIS]: { name: 'Sarachnis' },
|
|
1847
|
-
[Boss.SKOTIZO]: { name: 'Skotizo', minimumValue: 5 },
|
|
1848
1858
|
[Boss.SCORPIA]: { name: 'Scorpia' },
|
|
1859
|
+
[Boss.SKOTIZO]: { name: 'Skotizo', minimumValue: 5 },
|
|
1860
|
+
[Boss.SPINDEL]: { name: 'Spindel' },
|
|
1849
1861
|
[Boss.TEMPOROSS]: { name: 'Tempoross' },
|
|
1850
1862
|
[Boss.THE_GAUNTLET]: { name: 'The Gauntlet' },
|
|
1851
1863
|
[Boss.THE_CORRUPTED_GAUNTLET]: { name: 'The Corrupted Gauntlet', minimumValue: 5 },
|
|
@@ -2261,14 +2273,24 @@ const PlayerBuildProps = {
|
|
|
2261
2273
|
[PlayerBuild.DEF1]: { name: '1 Defence Pure' },
|
|
2262
2274
|
[PlayerBuild.HP10]: { name: '10 Hitpoints Pure' }
|
|
2263
2275
|
};
|
|
2276
|
+
const PlayerStatusProps = {
|
|
2277
|
+
[PlayerStatus.ACTIVE]: { name: 'Active' },
|
|
2278
|
+
[PlayerStatus.UNRANKED]: { name: 'Unranked' },
|
|
2279
|
+
[PlayerStatus.FLAGGED]: { name: 'Flagged' },
|
|
2280
|
+
[PlayerStatus.ARCHIVED]: { name: 'Archived' }
|
|
2281
|
+
};
|
|
2264
2282
|
const PLAYER_TYPES = Object.values(PlayerType);
|
|
2265
2283
|
const PLAYER_BUILDS = Object.values(PlayerBuild);
|
|
2284
|
+
const PLAYER_STATUSES = Object.values(PlayerStatus);
|
|
2266
2285
|
function isPlayerType(typeString) {
|
|
2267
2286
|
return typeString in PlayerTypeProps;
|
|
2268
2287
|
}
|
|
2269
2288
|
function isPlayerBuild(buildString) {
|
|
2270
2289
|
return buildString in PlayerBuildProps;
|
|
2271
2290
|
}
|
|
2291
|
+
function isPlayerStatus(statusString) {
|
|
2292
|
+
return statusString in PlayerStatusProps;
|
|
2293
|
+
}
|
|
2272
2294
|
function findPlayerType(typeName) {
|
|
2273
2295
|
for (const [key, value] of Object.entries(PlayerTypeProps)) {
|
|
2274
2296
|
if (value.name.toUpperCase() === typeName.toUpperCase())
|
|
@@ -2548,12 +2570,15 @@ exports.MetricProps = MetricProps;
|
|
|
2548
2570
|
exports.NameChangeStatus = NameChangeStatus;
|
|
2549
2571
|
exports.PERIODS = PERIODS;
|
|
2550
2572
|
exports.PLAYER_BUILDS = PLAYER_BUILDS;
|
|
2573
|
+
exports.PLAYER_STATUSES = PLAYER_STATUSES;
|
|
2551
2574
|
exports.PLAYER_TYPES = PLAYER_TYPES;
|
|
2552
2575
|
exports.PRIVELEGED_GROUP_ROLES = PRIVELEGED_GROUP_ROLES;
|
|
2553
2576
|
exports.Period = Period;
|
|
2554
2577
|
exports.PeriodProps = PeriodProps;
|
|
2555
2578
|
exports.PlayerBuild = PlayerBuild;
|
|
2556
2579
|
exports.PlayerBuildProps = PlayerBuildProps;
|
|
2580
|
+
exports.PlayerStatus = PlayerStatus;
|
|
2581
|
+
exports.PlayerStatusProps = PlayerStatusProps;
|
|
2557
2582
|
exports.PlayerType = PlayerType;
|
|
2558
2583
|
exports.PlayerTypeProps = PlayerTypeProps;
|
|
2559
2584
|
exports.REAL_SKILLS = REAL_SKILLS;
|
|
@@ -2589,6 +2614,7 @@ exports.isGroupRole = isGroupRole;
|
|
|
2589
2614
|
exports.isMetric = isMetric;
|
|
2590
2615
|
exports.isPeriod = isPeriod;
|
|
2591
2616
|
exports.isPlayerBuild = isPlayerBuild;
|
|
2617
|
+
exports.isPlayerStatus = isPlayerStatus;
|
|
2592
2618
|
exports.isPlayerType = isPlayerType;
|
|
2593
2619
|
exports.isSkill = isSkill;
|
|
2594
2620
|
exports.padNumber = padNumber;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise-old-man/utils",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"description": "A JavaScript/TypeScript client that interfaces and consumes the Wise Old Man API, an API that tracks and measures players' progress in Old School Runescape.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wiseoldman",
|