@wise-old-man/utils 2.0.0-beta.9 → 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/index.d.ts +12 -2
- package/dist/index.js +11 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -646,6 +646,7 @@ declare const PlayerType: {
|
|
|
646
646
|
readonly IRONMAN: "ironman";
|
|
647
647
|
readonly HARDCORE: "hardcore";
|
|
648
648
|
readonly ULTIMATE: "ultimate";
|
|
649
|
+
readonly FRESH_START: "fresh_start";
|
|
649
650
|
};
|
|
650
651
|
declare type PlayerType = typeof PlayerType[keyof typeof PlayerType];
|
|
651
652
|
declare const PlayerBuild: {
|
|
@@ -1391,6 +1392,10 @@ interface ParticipationWithPlayer extends CleanParticipation {
|
|
|
1391
1392
|
interface ParticipationWithPlayerAndProgress extends ParticipationWithPlayer {
|
|
1392
1393
|
progress: MeasuredDeltaProgress;
|
|
1393
1394
|
}
|
|
1395
|
+
interface ParticipationWithCompetitionAndStandings extends ParticipationWithCompetition {
|
|
1396
|
+
progress: MeasuredDeltaProgress;
|
|
1397
|
+
rank: number;
|
|
1398
|
+
}
|
|
1394
1399
|
interface Team {
|
|
1395
1400
|
name: string;
|
|
1396
1401
|
participants: string[];
|
|
@@ -1699,7 +1704,7 @@ declare const PlayerTypeProps: MapOf<PlayerType, {
|
|
|
1699
1704
|
declare const PlayerBuildProps: MapOf<PlayerBuild, {
|
|
1700
1705
|
name: string;
|
|
1701
1706
|
}>;
|
|
1702
|
-
declare const PLAYER_TYPES: ("unknown" | "regular" | "ironman" | "hardcore" | "ultimate")[];
|
|
1707
|
+
declare const PLAYER_TYPES: ("unknown" | "regular" | "ironman" | "hardcore" | "ultimate" | "fresh_start")[];
|
|
1703
1708
|
declare const PLAYER_BUILDS: ("main" | "f2p" | "lvl3" | "zerker" | "def1" | "hp10")[];
|
|
1704
1709
|
declare function isPlayerType(typeString: string): typeString is PlayerType;
|
|
1705
1710
|
declare function isPlayerBuild(buildString: string): buildString is PlayerBuild;
|
|
@@ -1978,6 +1983,11 @@ declare class PlayersClient extends BaseAPIClient {
|
|
|
1978
1983
|
* @returns A list of participations, with the respective competition included.
|
|
1979
1984
|
*/
|
|
1980
1985
|
getPlayerCompetitions(player: PlayerResolvable, pagination?: PaginationOptions): Promise<ParticipationWithCompetition[]>;
|
|
1986
|
+
/**
|
|
1987
|
+
* Fetches all of the player's competition participations' standings.
|
|
1988
|
+
* @returns A list of participations, with the respective competition, rank and progress included.
|
|
1989
|
+
*/
|
|
1990
|
+
getPlayerCompetitionStandings(player: PlayerResolvable): Promise<ParticipationWithCompetitionAndStandings[]>;
|
|
1981
1991
|
/**
|
|
1982
1992
|
* Fetches all of the player's group memberships.
|
|
1983
1993
|
* @returns A list of memberships, with the respective group included.
|
|
@@ -2129,4 +2139,4 @@ declare class WOMClient {
|
|
|
2129
2139
|
constructor(options?: WOMClientOptions);
|
|
2130
2140
|
}
|
|
2131
2141
|
|
|
2132
|
-
export { ACTIVITIES, Achievement, AchievementDefinition, AchievementProgress, AchievementTemplate, Activity, ActivityDelta, ActivityValue, AlgorithmCache, AssertPlayerTypeResponse, BOSSES, Bonus, BonusType, Boss, BossDelta, BossMetaConfig, BossValue, 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, Country, CountryDetails, CountryProps, CreateCompetitionPayload, CreateCompetitionResponse, CreateGroupPayload, CreateGroupResponse, DeltaLeaderboardEntry, DeltaLeaderboardFilter, EditCompetitionPayload, EditGroupPayload, EfficiencyAlgorithm, EfficiencyAlgorithmType, EfficiencyAlgorithmTypeUnion, EfficiencyLeaderboardsFilter, EfficiencyMap, ExperienceMap, ExtendedAchievement, 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, MetricMeasure, MetricProps, MetricType, MigrationDataSource, NameChangeDetails, NameChangeStatus, NameChangesSearchFilter, PERIODS, PLAYER_BUILDS, PLAYER_TYPES, PRIVELEGED_GROUP_ROLES, ParticipationWithCompetition, ParticipationWithPlayer, ParticipationWithPlayerAndProgress, Period, PeriodProps, Player, PlayerBuild, PlayerBuildProps, PlayerDeltasArray, PlayerDeltasMap, PlayerDetails, PlayerRecordsFilter, PlayerResolvable, PlayerType, PlayerTypeProps, REAL_SKILLS, Record, RecordLeaderboardEntry, RecordLeaderboardFilter, SKILLS, SKILL_EXP_AT_99, Skill, SkillDelta, SkillMetaConfig, SkillValue, 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 };
|
|
2142
|
+
export { ACTIVITIES, Achievement, AchievementDefinition, AchievementProgress, AchievementTemplate, Activity, ActivityDelta, ActivityValue, AlgorithmCache, AssertPlayerTypeResponse, BOSSES, Bonus, BonusType, Boss, BossDelta, BossMetaConfig, BossValue, 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, Country, CountryDetails, CountryProps, CreateCompetitionPayload, CreateCompetitionResponse, CreateGroupPayload, CreateGroupResponse, DeltaLeaderboardEntry, DeltaLeaderboardFilter, EditCompetitionPayload, EditGroupPayload, EfficiencyAlgorithm, EfficiencyAlgorithmType, EfficiencyAlgorithmTypeUnion, EfficiencyLeaderboardsFilter, EfficiencyMap, ExperienceMap, ExtendedAchievement, 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, MetricMeasure, MetricProps, MetricType, MigrationDataSource, NameChangeDetails, NameChangeStatus, NameChangesSearchFilter, PERIODS, PLAYER_BUILDS, PLAYER_TYPES, PRIVELEGED_GROUP_ROLES, ParticipationWithCompetition, ParticipationWithCompetitionAndStandings, ParticipationWithPlayer, ParticipationWithPlayerAndProgress, Period, PeriodProps, Player, PlayerBuild, PlayerBuildProps, PlayerDeltasArray, PlayerDeltasMap, PlayerDetails, PlayerRecordsFilter, PlayerResolvable, PlayerType, PlayerTypeProps, REAL_SKILLS, Record, RecordLeaderboardEntry, RecordLeaderboardFilter, SKILLS, SKILL_EXP_AT_99, Skill, SkillDelta, SkillMetaConfig, SkillValue, 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 };
|
package/dist/index.js
CHANGED
|
@@ -366,6 +366,13 @@ class PlayersClient extends BaseAPIClient {
|
|
|
366
366
|
getPlayerCompetitions(player, pagination) {
|
|
367
367
|
return this.getRequest(`${getPlayerURL(player)}/competitions`, pagination);
|
|
368
368
|
}
|
|
369
|
+
/**
|
|
370
|
+
* Fetches all of the player's competition participations' standings.
|
|
371
|
+
* @returns A list of participations, with the respective competition, rank and progress included.
|
|
372
|
+
*/
|
|
373
|
+
getPlayerCompetitionStandings(player) {
|
|
374
|
+
return this.getRequest(`${getPlayerURL(player)}/competitions/standings`);
|
|
375
|
+
}
|
|
369
376
|
/**
|
|
370
377
|
* Fetches all of the player's group memberships.
|
|
371
378
|
* @returns A list of memberships, with the respective group included.
|
|
@@ -586,7 +593,8 @@ const PlayerType = {
|
|
|
586
593
|
REGULAR: 'regular',
|
|
587
594
|
IRONMAN: 'ironman',
|
|
588
595
|
HARDCORE: 'hardcore',
|
|
589
|
-
ULTIMATE: 'ultimate'
|
|
596
|
+
ULTIMATE: 'ultimate',
|
|
597
|
+
FRESH_START: 'fresh_start'
|
|
590
598
|
};
|
|
591
599
|
const PlayerBuild = {
|
|
592
600
|
MAIN: 'main',
|
|
@@ -2232,7 +2240,8 @@ const PlayerTypeProps = {
|
|
|
2232
2240
|
[PlayerType.REGULAR]: { name: 'Regular' },
|
|
2233
2241
|
[PlayerType.IRONMAN]: { name: 'Ironman' },
|
|
2234
2242
|
[PlayerType.HARDCORE]: { name: 'Hardcore' },
|
|
2235
|
-
[PlayerType.ULTIMATE]: { name: 'Ultimate' }
|
|
2243
|
+
[PlayerType.ULTIMATE]: { name: 'Ultimate' },
|
|
2244
|
+
[PlayerType.FRESH_START]: { name: 'Fresh Start' }
|
|
2236
2245
|
};
|
|
2237
2246
|
const PlayerBuildProps = {
|
|
2238
2247
|
[PlayerBuild.MAIN]: { name: 'Main' },
|