@wise-old-man/utils 4.0.1 → 4.0.3
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 +28 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1733,6 +1733,30 @@ type MemberActivityResponse = MemberActivity;
|
|
|
1733
1733
|
|
|
1734
1734
|
type NameChangeResponse = NameChange;
|
|
1735
1735
|
|
|
1736
|
+
/**
|
|
1737
|
+
* Response types are used to format the data returned by the API.
|
|
1738
|
+
*
|
|
1739
|
+
* Although sometimes very similar to our database models,
|
|
1740
|
+
* they often include transformations, additional properties or sensitive field omissions.
|
|
1741
|
+
*/
|
|
1742
|
+
|
|
1743
|
+
interface NameChangeDetailsResponse {
|
|
1744
|
+
nameChange: NameChangeResponse;
|
|
1745
|
+
data?: {
|
|
1746
|
+
isNewOnHiscores: boolean;
|
|
1747
|
+
isOldOnHiscores: boolean;
|
|
1748
|
+
isNewTracked: boolean;
|
|
1749
|
+
hasNegativeGains: boolean;
|
|
1750
|
+
negativeGains: Record<Metric, number> | null;
|
|
1751
|
+
timeDiff: number;
|
|
1752
|
+
hoursDiff: number;
|
|
1753
|
+
ehpDiff: number;
|
|
1754
|
+
ehbDiff: number;
|
|
1755
|
+
oldStats: SnapshotResponse;
|
|
1756
|
+
newStats: SnapshotResponse | null;
|
|
1757
|
+
};
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1736
1760
|
/**
|
|
1737
1761
|
* Response types are used to format the data returned by the API.
|
|
1738
1762
|
*
|
|
@@ -2100,9 +2124,9 @@ declare class GroupsClient extends BaseAPIClient {
|
|
|
2100
2124
|
* Fetches a group members' latest name changes.
|
|
2101
2125
|
* @returns A list of name change (approved) requests.
|
|
2102
2126
|
*/
|
|
2103
|
-
getGroupNameChanges(id: number, pagination?: PaginationOptions): Promise<NameChange & {
|
|
2127
|
+
getGroupNameChanges(id: number, pagination?: PaginationOptions): Promise<(NameChange & {
|
|
2104
2128
|
player: PlayerResponse;
|
|
2105
|
-
}>;
|
|
2129
|
+
})[]>;
|
|
2106
2130
|
/**
|
|
2107
2131
|
* Fetches a group's general statistics.
|
|
2108
2132
|
* @returns An object with a few statistic values and an average stats snapshot.
|
|
@@ -2198,7 +2222,7 @@ declare class PlayersClient extends BaseAPIClient {
|
|
|
2198
2222
|
* @returns A list of memberships, with the respective group included.
|
|
2199
2223
|
*/
|
|
2200
2224
|
getPlayerGroups(username: string, pagination?: PaginationOptions): Promise<(Membership & {
|
|
2201
|
-
|
|
2225
|
+
group: GroupResponse;
|
|
2202
2226
|
})[]>;
|
|
2203
2227
|
/**
|
|
2204
2228
|
* Fetches a player's gains, for a specific period or time range, as a [metric: data] map.
|
|
@@ -3928,4 +3952,4 @@ declare const PlayerTypeProps: Record<PlayerType, {
|
|
|
3928
3952
|
}>;
|
|
3929
3953
|
declare function isPlayerType(typeString: string): typeString is PlayerType;
|
|
3930
3954
|
|
|
3931
|
-
export { ACTIVITIES, type Achievement, type AchievementDefinition, type AchievementMeasure, type AchievementProgressResponse, type AchievementResponse, Activity, ActivityProps, BOSSES, Boss, type BossMetaConfig, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, type Competition, CompetitionCSVTableType, type CompetitionDetailsResponse, type CompetitionResponse, CompetitionStatus, CompetitionStatusProps, type CompetitionTeam, CompetitionType, CompetitionTypeProps, ComputedMetric, ComputedMetricProps, Country, CountryProps, type CreateCompetitionPayload, type CreateGroupPayload, type Delta, type EditCompetitionPayload, type EditGroupPayload, EfficiencyAlgorithmType, F2P_BOSSES, GROUP_ROLES, type GenericCountMessageResponse, type GenericMessageResponse, type Group, type GroupDetailsResponse, type GroupHiscoresEntryResponse, type GroupResponse, GroupRole, type GroupRoleOrder, GroupRoleProps, type GroupSocialLinks, type GroupStatisticsResponse, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, type MemberActivity, type MemberActivityResponse, MemberActivityType, type Membership, type MembershipResponse, Metric, type MetricDelta, MetricMeasure, MetricProps, MetricType, type NameChange, type NameChangeDenyContext, type NameChangeResponse, type NameChangeReviewContext, type NameChangeSkipContext, NameChangeStatus, PERIODS, PLAYER_BUILDS, PLAYER_STATUSES, PLAYER_TYPES, PRIVILEGED_GROUP_ROLES, type ParticipantHistoryResponse, type Participation, type ParticipationResponse, type Patron, Period, PeriodProps, type Player, type PlayerAnnotation, PlayerAnnotationType, type PlayerArchive, type PlayerArchiveResponse, PlayerBuild, PlayerBuildProps, type PlayerCompetitionStandingResponse, type PlayerDeltasMapResponse, type PlayerDetailsResponse, type PlayerResponse, PlayerStatus, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, type Record$1 as Record, type RecordResponse, SKILLS, SKILL_EXP_AT_99, Skill, type SkillMetaBonus, type SkillMetaConfig, type SkillMetaMethod, SkillProps, type Snapshot, type SnapshotResponse, type TimeRangeFilter, WOMClient, findCountry, findCountryByCode, findCountryByName, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill };
|
|
3955
|
+
export { ACTIVITIES, type Achievement, type AchievementDefinition, type AchievementMeasure, type AchievementProgressResponse, type AchievementResponse, Activity, ActivityProps, BOSSES, Boss, type BossMetaConfig, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, type Competition, CompetitionCSVTableType, type CompetitionDetailsResponse, type CompetitionResponse, CompetitionStatus, CompetitionStatusProps, type CompetitionTeam, CompetitionType, CompetitionTypeProps, ComputedMetric, ComputedMetricProps, Country, CountryProps, type CreateCompetitionPayload, type CreateGroupPayload, type Delta, type EditCompetitionPayload, type EditGroupPayload, EfficiencyAlgorithmType, F2P_BOSSES, GROUP_ROLES, type GenericCountMessageResponse, type GenericMessageResponse, type Group, type GroupDetailsResponse, type GroupHiscoresEntryResponse, type GroupResponse, GroupRole, type GroupRoleOrder, GroupRoleProps, type GroupSocialLinks, type GroupStatisticsResponse, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, type MemberActivity, type MemberActivityResponse, MemberActivityType, type Membership, type MembershipResponse, Metric, type MetricDelta, MetricMeasure, MetricProps, MetricType, type NameChange, type NameChangeDenyContext, type NameChangeDetailsResponse, type NameChangeResponse, type NameChangeReviewContext, type NameChangeSkipContext, NameChangeStatus, PERIODS, PLAYER_BUILDS, PLAYER_STATUSES, PLAYER_TYPES, PRIVILEGED_GROUP_ROLES, type ParticipantHistoryResponse, type Participation, type ParticipationResponse, type Patron, Period, PeriodProps, type Player, type PlayerAnnotation, PlayerAnnotationType, type PlayerArchive, type PlayerArchiveResponse, PlayerBuild, PlayerBuildProps, type PlayerCompetitionStandingResponse, type PlayerDeltasMapResponse, type PlayerDetailsResponse, type PlayerResponse, PlayerStatus, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, type Record$1 as Record, type RecordResponse, SKILLS, SKILL_EXP_AT_99, Skill, type SkillMetaBonus, type SkillMetaConfig, type SkillMetaMethod, SkillProps, type Snapshot, type SnapshotResponse, type TimeRangeFilter, WOMClient, findCountry, findCountryByCode, findCountryByName, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise-old-man/utils",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
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",
|