@wise-old-man/utils 4.0.0 → 4.0.1
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/cjs/index.cjs +52 -17
- package/dist/es/index.js +25 -10
- package/dist/es/index.mjs +25 -10
- package/dist/index.d.ts +376 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -320,13 +320,13 @@ exports.CompetitionStatus = void 0;
|
|
|
320
320
|
CompetitionStatus["ONGOING"] = "ongoing";
|
|
321
321
|
CompetitionStatus["FINISHED"] = "finished";
|
|
322
322
|
})(exports.CompetitionStatus || (exports.CompetitionStatus = {}));
|
|
323
|
-
Object.values(exports.CompetitionStatus);
|
|
323
|
+
const COMPETITION_STATUSES = Object.values(exports.CompetitionStatus);
|
|
324
324
|
|
|
325
325
|
const CompetitionType = {
|
|
326
326
|
CLASSIC: 'classic',
|
|
327
327
|
TEAM: 'team'
|
|
328
328
|
};
|
|
329
|
-
Object.values(CompetitionType);
|
|
329
|
+
const COMPETITION_TYPES = Object.values(CompetitionType);
|
|
330
330
|
|
|
331
331
|
const Country = {
|
|
332
332
|
AD: 'AD',
|
|
@@ -582,7 +582,7 @@ const Country = {
|
|
|
582
582
|
ZM: 'ZM',
|
|
583
583
|
ZW: 'ZW'
|
|
584
584
|
};
|
|
585
|
-
Object.values(Country);
|
|
585
|
+
const COUNTRY_CODES = Object.values(Country);
|
|
586
586
|
|
|
587
587
|
exports.EfficiencyAlgorithmType = void 0;
|
|
588
588
|
(function (EfficiencyAlgorithmType) {
|
|
@@ -868,23 +868,29 @@ const GroupRole = {
|
|
|
868
868
|
ZEALOT: 'zealot',
|
|
869
869
|
ZENYTE: 'zenyte'
|
|
870
870
|
};
|
|
871
|
-
Object.values(GroupRole);
|
|
871
|
+
const GROUP_ROLES = Object.values(GroupRole);
|
|
872
872
|
|
|
873
|
-
|
|
873
|
+
const MemberActivityType = {
|
|
874
|
+
JOINED: 'joined',
|
|
875
|
+
LEFT: 'left',
|
|
876
|
+
CHANGED_ROLE: 'changed_role'
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
exports.MetricMeasure = void 0;
|
|
874
880
|
(function (MetricMeasure) {
|
|
875
881
|
MetricMeasure["EXPERIENCE"] = "experience";
|
|
876
882
|
MetricMeasure["KILLS"] = "kills";
|
|
877
883
|
MetricMeasure["SCORE"] = "score";
|
|
878
884
|
MetricMeasure["VALUE"] = "value";
|
|
879
|
-
})(MetricMeasure || (MetricMeasure = {}));
|
|
885
|
+
})(exports.MetricMeasure || (exports.MetricMeasure = {}));
|
|
880
886
|
|
|
881
|
-
|
|
887
|
+
exports.MetricType = void 0;
|
|
882
888
|
(function (MetricType) {
|
|
883
889
|
MetricType["SKILL"] = "skill";
|
|
884
890
|
MetricType["BOSS"] = "boss";
|
|
885
891
|
MetricType["ACTIVITY"] = "activity";
|
|
886
892
|
MetricType["COMPUTED"] = "computed";
|
|
887
|
-
})(MetricType || (MetricType = {}));
|
|
893
|
+
})(exports.MetricType || (exports.MetricType = {}));
|
|
888
894
|
|
|
889
895
|
const Skill = {
|
|
890
896
|
OVERALL: 'overall',
|
|
@@ -1004,11 +1010,11 @@ const ComputedMetric = {
|
|
|
1004
1010
|
EHB: 'ehb'
|
|
1005
1011
|
};
|
|
1006
1012
|
const Metric = Object.assign(Object.assign(Object.assign(Object.assign({}, Skill), Activity), Boss), ComputedMetric);
|
|
1007
|
-
Object.values(Metric);
|
|
1013
|
+
const METRICS = Object.values(Metric);
|
|
1008
1014
|
const SKILLS = Object.values(Skill);
|
|
1009
1015
|
const BOSSES = Object.values(Boss);
|
|
1010
1016
|
const ACTIVITIES = Object.values(Activity);
|
|
1011
|
-
Object.values(ComputedMetric);
|
|
1017
|
+
const COMPUTED_METRICS = Object.values(ComputedMetric);
|
|
1012
1018
|
|
|
1013
1019
|
const NameChangeStatus = {
|
|
1014
1020
|
PENDING: 'pending',
|
|
@@ -1023,7 +1029,15 @@ const Period = {
|
|
|
1023
1029
|
MONTH: 'month',
|
|
1024
1030
|
YEAR: 'year'
|
|
1025
1031
|
};
|
|
1026
|
-
Object.values(Period);
|
|
1032
|
+
const PERIODS = Object.values(Period);
|
|
1033
|
+
|
|
1034
|
+
const PlayerAnnotationType = {
|
|
1035
|
+
OPT_OUT: 'opt_out',
|
|
1036
|
+
OPT_OUT_GROUPS: 'opt_out_groups',
|
|
1037
|
+
OPT_OUT_COMPETITIONS: 'opt_out_competitions',
|
|
1038
|
+
BLOCKED: 'blocked',
|
|
1039
|
+
FAKE_F2P: 'fake_f2p'
|
|
1040
|
+
};
|
|
1027
1041
|
|
|
1028
1042
|
const PlayerBuild = {
|
|
1029
1043
|
MAIN: 'main',
|
|
@@ -1034,7 +1048,7 @@ const PlayerBuild = {
|
|
|
1034
1048
|
DEF1: 'def1',
|
|
1035
1049
|
HP10: 'hp10'
|
|
1036
1050
|
};
|
|
1037
|
-
Object.values(PlayerBuild);
|
|
1051
|
+
const PLAYER_BUILDS = Object.values(PlayerBuild);
|
|
1038
1052
|
|
|
1039
1053
|
const PlayerStatus = {
|
|
1040
1054
|
ACTIVE: 'active',
|
|
@@ -1043,6 +1057,7 @@ const PlayerStatus = {
|
|
|
1043
1057
|
ARCHIVED: 'archived',
|
|
1044
1058
|
BANNED: 'banned'
|
|
1045
1059
|
};
|
|
1060
|
+
const PLAYER_STATUSES = Object.values(PlayerStatus);
|
|
1046
1061
|
|
|
1047
1062
|
const PlayerType = {
|
|
1048
1063
|
UNKNOWN: 'unknown',
|
|
@@ -1051,7 +1066,7 @@ const PlayerType = {
|
|
|
1051
1066
|
HARDCORE: 'hardcore',
|
|
1052
1067
|
ULTIMATE: 'ultimate'
|
|
1053
1068
|
};
|
|
1054
|
-
Object.values(PlayerType);
|
|
1069
|
+
const PLAYER_TYPES = Object.values(PlayerType);
|
|
1055
1070
|
|
|
1056
1071
|
class EfficiencyClient extends BaseAPIClient {
|
|
1057
1072
|
/**
|
|
@@ -2044,7 +2059,7 @@ const SkillProps = mapValues({
|
|
|
2044
2059
|
[Skill.RUNECRAFTING]: { name: 'Runecrafting' },
|
|
2045
2060
|
[Skill.HUNTER]: { name: 'Hunter', isMembers: true },
|
|
2046
2061
|
[Skill.CONSTRUCTION]: { name: 'Construction', isMembers: true }
|
|
2047
|
-
}, props => (Object.assign(Object.assign({}, props), { type: MetricType.SKILL, measure: MetricMeasure.EXPERIENCE, isCombat: 'isCombat' in props ? props.isCombat : false, isMembers: 'isMembers' in props ? props.isMembers : false })));
|
|
2062
|
+
}, props => (Object.assign(Object.assign({}, props), { type: exports.MetricType.SKILL, measure: exports.MetricMeasure.EXPERIENCE, isCombat: 'isCombat' in props ? props.isCombat : false, isMembers: 'isMembers' in props ? props.isMembers : false })));
|
|
2048
2063
|
const BossProps = mapValues({
|
|
2049
2064
|
[Boss.ABYSSAL_SIRE]: { name: 'Abyssal Sire' },
|
|
2050
2065
|
[Boss.ALCHEMICAL_HYDRA]: { name: 'Alchemical Hydra' },
|
|
@@ -2113,7 +2128,7 @@ const BossProps = mapValues({
|
|
|
2113
2128
|
[Boss.YAMA]: { name: 'Yama' },
|
|
2114
2129
|
[Boss.ZALCANO]: { name: 'Zalcano' },
|
|
2115
2130
|
[Boss.ZULRAH]: { name: 'Zulrah' }
|
|
2116
|
-
}, props => (Object.assign(Object.assign({}, props), { type: MetricType.BOSS, measure: MetricMeasure.KILLS, isMembers: 'isMembers' in props ? props.isMembers : true, minimumValue: 'minimumValue' in props ? props.minimumValue : 5 })));
|
|
2131
|
+
}, props => (Object.assign(Object.assign({}, props), { type: exports.MetricType.BOSS, measure: exports.MetricMeasure.KILLS, isMembers: 'isMembers' in props ? props.isMembers : true, minimumValue: 'minimumValue' in props ? props.minimumValue : 5 })));
|
|
2117
2132
|
const ActivityProps = mapValues({
|
|
2118
2133
|
[Activity.LEAGUE_POINTS]: { name: 'League Points', minimumValue: 100 },
|
|
2119
2134
|
[Activity.BOUNTY_HUNTER_HUNTER]: { name: 'Bounty Hunter (Hunter)', minimumValue: 2 },
|
|
@@ -2131,11 +2146,11 @@ const ActivityProps = mapValues({
|
|
|
2131
2146
|
[Activity.GUARDIANS_OF_THE_RIFT]: { name: 'Guardians of the Rift', minimumValue: 2 },
|
|
2132
2147
|
[Activity.COLOSSEUM_GLORY]: { name: 'Colosseum Glory', minimumValue: 300 },
|
|
2133
2148
|
[Activity.COLLECTIONS_LOGGED]: { name: 'Collection Logs', minimumValue: 500 }
|
|
2134
|
-
}, props => (Object.assign(Object.assign({}, props), { type: MetricType.ACTIVITY, measure: MetricMeasure.SCORE, minimumValue: 'minimumValue' in props ? props.minimumValue : 1 })));
|
|
2149
|
+
}, props => (Object.assign(Object.assign({}, props), { type: exports.MetricType.ACTIVITY, measure: exports.MetricMeasure.SCORE, minimumValue: 'minimumValue' in props ? props.minimumValue : 1 })));
|
|
2135
2150
|
const ComputedMetricProps = mapValues({
|
|
2136
2151
|
[ComputedMetric.EHP]: { name: 'EHP' },
|
|
2137
2152
|
[ComputedMetric.EHB]: { name: 'EHB' }
|
|
2138
|
-
}, props => (Object.assign(Object.assign({}, props), { type: MetricType.COMPUTED, measure: MetricMeasure.VALUE })));
|
|
2153
|
+
}, props => (Object.assign(Object.assign({}, props), { type: exports.MetricType.COMPUTED, measure: exports.MetricMeasure.VALUE })));
|
|
2139
2154
|
const MetricProps = Object.assign(Object.assign(Object.assign(Object.assign({}, SkillProps), BossProps), ActivityProps), ComputedMetricProps);
|
|
2140
2155
|
const REAL_SKILLS = SKILLS.filter(s => s !== Skill.OVERALL);
|
|
2141
2156
|
const F2P_BOSSES = BOSSES.filter(b => !MetricProps[b].isMembers);
|
|
@@ -2214,37 +2229,57 @@ function isPlayerType(typeString) {
|
|
|
2214
2229
|
return typeString in PlayerTypeProps;
|
|
2215
2230
|
}
|
|
2216
2231
|
|
|
2232
|
+
exports.ACTIVITIES = ACTIVITIES;
|
|
2233
|
+
exports.Activity = Activity;
|
|
2217
2234
|
exports.ActivityProps = ActivityProps;
|
|
2235
|
+
exports.BOSSES = BOSSES;
|
|
2236
|
+
exports.Boss = Boss;
|
|
2218
2237
|
exports.BossProps = BossProps;
|
|
2219
2238
|
exports.CAPPED_MAX_TOTAL_XP = CAPPED_MAX_TOTAL_XP;
|
|
2220
2239
|
exports.COMBAT_SKILLS = COMBAT_SKILLS;
|
|
2240
|
+
exports.COMPETITION_STATUSES = COMPETITION_STATUSES;
|
|
2241
|
+
exports.COMPETITION_TYPES = COMPETITION_TYPES;
|
|
2242
|
+
exports.COMPUTED_METRICS = COMPUTED_METRICS;
|
|
2243
|
+
exports.COUNTRY_CODES = COUNTRY_CODES;
|
|
2221
2244
|
exports.CompetitionStatusProps = CompetitionStatusProps;
|
|
2222
2245
|
exports.CompetitionType = CompetitionType;
|
|
2223
2246
|
exports.CompetitionTypeProps = CompetitionTypeProps;
|
|
2247
|
+
exports.ComputedMetric = ComputedMetric;
|
|
2224
2248
|
exports.ComputedMetricProps = ComputedMetricProps;
|
|
2225
2249
|
exports.Country = Country;
|
|
2226
2250
|
exports.CountryProps = CountryProps;
|
|
2227
2251
|
exports.F2P_BOSSES = F2P_BOSSES;
|
|
2252
|
+
exports.GROUP_ROLES = GROUP_ROLES;
|
|
2228
2253
|
exports.GroupRole = GroupRole;
|
|
2229
2254
|
exports.GroupRoleProps = GroupRoleProps;
|
|
2230
2255
|
exports.MAX_LEVEL = MAX_LEVEL;
|
|
2231
2256
|
exports.MAX_SKILL_EXP = MAX_SKILL_EXP;
|
|
2232
2257
|
exports.MAX_VIRTUAL_LEVEL = MAX_VIRTUAL_LEVEL;
|
|
2233
2258
|
exports.MEMBER_SKILLS = MEMBER_SKILLS;
|
|
2259
|
+
exports.METRICS = METRICS;
|
|
2260
|
+
exports.MemberActivityType = MemberActivityType;
|
|
2234
2261
|
exports.Metric = Metric;
|
|
2235
2262
|
exports.MetricProps = MetricProps;
|
|
2236
2263
|
exports.NameChangeStatus = NameChangeStatus;
|
|
2264
|
+
exports.PERIODS = PERIODS;
|
|
2265
|
+
exports.PLAYER_BUILDS = PLAYER_BUILDS;
|
|
2266
|
+
exports.PLAYER_STATUSES = PLAYER_STATUSES;
|
|
2267
|
+
exports.PLAYER_TYPES = PLAYER_TYPES;
|
|
2237
2268
|
exports.PRIVILEGED_GROUP_ROLES = PRIVILEGED_GROUP_ROLES;
|
|
2238
2269
|
exports.Period = Period;
|
|
2239
2270
|
exports.PeriodProps = PeriodProps;
|
|
2271
|
+
exports.PlayerAnnotationType = PlayerAnnotationType;
|
|
2240
2272
|
exports.PlayerBuild = PlayerBuild;
|
|
2241
2273
|
exports.PlayerBuildProps = PlayerBuildProps;
|
|
2274
|
+
exports.PlayerStatus = PlayerStatus;
|
|
2242
2275
|
exports.PlayerStatusProps = PlayerStatusProps;
|
|
2243
2276
|
exports.PlayerType = PlayerType;
|
|
2244
2277
|
exports.PlayerTypeProps = PlayerTypeProps;
|
|
2245
2278
|
exports.REAL_METRICS = REAL_METRICS;
|
|
2246
2279
|
exports.REAL_SKILLS = REAL_SKILLS;
|
|
2280
|
+
exports.SKILLS = SKILLS;
|
|
2247
2281
|
exports.SKILL_EXP_AT_99 = SKILL_EXP_AT_99;
|
|
2282
|
+
exports.Skill = Skill;
|
|
2248
2283
|
exports.SkillProps = SkillProps;
|
|
2249
2284
|
exports.WOMClient = WOMClient;
|
|
2250
2285
|
exports.findCountry = findCountry;
|
package/dist/es/index.js
CHANGED
|
@@ -318,13 +318,13 @@ var CompetitionStatus;
|
|
|
318
318
|
CompetitionStatus["ONGOING"] = "ongoing";
|
|
319
319
|
CompetitionStatus["FINISHED"] = "finished";
|
|
320
320
|
})(CompetitionStatus || (CompetitionStatus = {}));
|
|
321
|
-
Object.values(CompetitionStatus);
|
|
321
|
+
const COMPETITION_STATUSES = Object.values(CompetitionStatus);
|
|
322
322
|
|
|
323
323
|
const CompetitionType = {
|
|
324
324
|
CLASSIC: 'classic',
|
|
325
325
|
TEAM: 'team'
|
|
326
326
|
};
|
|
327
|
-
Object.values(CompetitionType);
|
|
327
|
+
const COMPETITION_TYPES = Object.values(CompetitionType);
|
|
328
328
|
|
|
329
329
|
const Country = {
|
|
330
330
|
AD: 'AD',
|
|
@@ -580,7 +580,7 @@ const Country = {
|
|
|
580
580
|
ZM: 'ZM',
|
|
581
581
|
ZW: 'ZW'
|
|
582
582
|
};
|
|
583
|
-
Object.values(Country);
|
|
583
|
+
const COUNTRY_CODES = Object.values(Country);
|
|
584
584
|
|
|
585
585
|
var EfficiencyAlgorithmType;
|
|
586
586
|
(function (EfficiencyAlgorithmType) {
|
|
@@ -866,7 +866,13 @@ const GroupRole = {
|
|
|
866
866
|
ZEALOT: 'zealot',
|
|
867
867
|
ZENYTE: 'zenyte'
|
|
868
868
|
};
|
|
869
|
-
Object.values(GroupRole);
|
|
869
|
+
const GROUP_ROLES = Object.values(GroupRole);
|
|
870
|
+
|
|
871
|
+
const MemberActivityType = {
|
|
872
|
+
JOINED: 'joined',
|
|
873
|
+
LEFT: 'left',
|
|
874
|
+
CHANGED_ROLE: 'changed_role'
|
|
875
|
+
};
|
|
870
876
|
|
|
871
877
|
var MetricMeasure;
|
|
872
878
|
(function (MetricMeasure) {
|
|
@@ -1002,11 +1008,11 @@ const ComputedMetric = {
|
|
|
1002
1008
|
EHB: 'ehb'
|
|
1003
1009
|
};
|
|
1004
1010
|
const Metric = Object.assign(Object.assign(Object.assign(Object.assign({}, Skill), Activity), Boss), ComputedMetric);
|
|
1005
|
-
Object.values(Metric);
|
|
1011
|
+
const METRICS = Object.values(Metric);
|
|
1006
1012
|
const SKILLS = Object.values(Skill);
|
|
1007
1013
|
const BOSSES = Object.values(Boss);
|
|
1008
1014
|
const ACTIVITIES = Object.values(Activity);
|
|
1009
|
-
Object.values(ComputedMetric);
|
|
1015
|
+
const COMPUTED_METRICS = Object.values(ComputedMetric);
|
|
1010
1016
|
|
|
1011
1017
|
const NameChangeStatus = {
|
|
1012
1018
|
PENDING: 'pending',
|
|
@@ -1021,7 +1027,15 @@ const Period = {
|
|
|
1021
1027
|
MONTH: 'month',
|
|
1022
1028
|
YEAR: 'year'
|
|
1023
1029
|
};
|
|
1024
|
-
Object.values(Period);
|
|
1030
|
+
const PERIODS = Object.values(Period);
|
|
1031
|
+
|
|
1032
|
+
const PlayerAnnotationType = {
|
|
1033
|
+
OPT_OUT: 'opt_out',
|
|
1034
|
+
OPT_OUT_GROUPS: 'opt_out_groups',
|
|
1035
|
+
OPT_OUT_COMPETITIONS: 'opt_out_competitions',
|
|
1036
|
+
BLOCKED: 'blocked',
|
|
1037
|
+
FAKE_F2P: 'fake_f2p'
|
|
1038
|
+
};
|
|
1025
1039
|
|
|
1026
1040
|
const PlayerBuild = {
|
|
1027
1041
|
MAIN: 'main',
|
|
@@ -1032,7 +1046,7 @@ const PlayerBuild = {
|
|
|
1032
1046
|
DEF1: 'def1',
|
|
1033
1047
|
HP10: 'hp10'
|
|
1034
1048
|
};
|
|
1035
|
-
Object.values(PlayerBuild);
|
|
1049
|
+
const PLAYER_BUILDS = Object.values(PlayerBuild);
|
|
1036
1050
|
|
|
1037
1051
|
const PlayerStatus = {
|
|
1038
1052
|
ACTIVE: 'active',
|
|
@@ -1041,6 +1055,7 @@ const PlayerStatus = {
|
|
|
1041
1055
|
ARCHIVED: 'archived',
|
|
1042
1056
|
BANNED: 'banned'
|
|
1043
1057
|
};
|
|
1058
|
+
const PLAYER_STATUSES = Object.values(PlayerStatus);
|
|
1044
1059
|
|
|
1045
1060
|
const PlayerType = {
|
|
1046
1061
|
UNKNOWN: 'unknown',
|
|
@@ -1049,7 +1064,7 @@ const PlayerType = {
|
|
|
1049
1064
|
HARDCORE: 'hardcore',
|
|
1050
1065
|
ULTIMATE: 'ultimate'
|
|
1051
1066
|
};
|
|
1052
|
-
Object.values(PlayerType);
|
|
1067
|
+
const PLAYER_TYPES = Object.values(PlayerType);
|
|
1053
1068
|
|
|
1054
1069
|
class EfficiencyClient extends BaseAPIClient {
|
|
1055
1070
|
/**
|
|
@@ -2212,4 +2227,4 @@ function isPlayerType(typeString) {
|
|
|
2212
2227
|
return typeString in PlayerTypeProps;
|
|
2213
2228
|
}
|
|
2214
2229
|
|
|
2215
|
-
export { ActivityProps, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, CompetitionCSVTableType, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, ComputedMetricProps, Country, CountryProps, EfficiencyAlgorithmType, F2P_BOSSES, GroupRole, GroupRoleProps, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, Metric, MetricProps, NameChangeStatus, PRIVILEGED_GROUP_ROLES, Period, PeriodProps, PlayerBuild, PlayerBuildProps, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, SKILL_EXP_AT_99, SkillProps, WOMClient, findCountry, findCountryByCode, findCountryByName, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill };
|
|
2230
|
+
export { ACTIVITIES, Activity, ActivityProps, BOSSES, Boss, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, CompetitionCSVTableType, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, ComputedMetric, ComputedMetricProps, Country, CountryProps, EfficiencyAlgorithmType, F2P_BOSSES, GROUP_ROLES, GroupRole, GroupRoleProps, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, MemberActivityType, Metric, MetricMeasure, MetricProps, MetricType, NameChangeStatus, PERIODS, PLAYER_BUILDS, PLAYER_STATUSES, PLAYER_TYPES, PRIVILEGED_GROUP_ROLES, Period, PeriodProps, PlayerAnnotationType, PlayerBuild, PlayerBuildProps, PlayerStatus, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, SKILLS, SKILL_EXP_AT_99, Skill, SkillProps, WOMClient, findCountry, findCountryByCode, findCountryByName, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill };
|
package/dist/es/index.mjs
CHANGED
|
@@ -318,13 +318,13 @@ var CompetitionStatus;
|
|
|
318
318
|
CompetitionStatus["ONGOING"] = "ongoing";
|
|
319
319
|
CompetitionStatus["FINISHED"] = "finished";
|
|
320
320
|
})(CompetitionStatus || (CompetitionStatus = {}));
|
|
321
|
-
Object.values(CompetitionStatus);
|
|
321
|
+
const COMPETITION_STATUSES = Object.values(CompetitionStatus);
|
|
322
322
|
|
|
323
323
|
const CompetitionType = {
|
|
324
324
|
CLASSIC: 'classic',
|
|
325
325
|
TEAM: 'team'
|
|
326
326
|
};
|
|
327
|
-
Object.values(CompetitionType);
|
|
327
|
+
const COMPETITION_TYPES = Object.values(CompetitionType);
|
|
328
328
|
|
|
329
329
|
const Country = {
|
|
330
330
|
AD: 'AD',
|
|
@@ -580,7 +580,7 @@ const Country = {
|
|
|
580
580
|
ZM: 'ZM',
|
|
581
581
|
ZW: 'ZW'
|
|
582
582
|
};
|
|
583
|
-
Object.values(Country);
|
|
583
|
+
const COUNTRY_CODES = Object.values(Country);
|
|
584
584
|
|
|
585
585
|
var EfficiencyAlgorithmType;
|
|
586
586
|
(function (EfficiencyAlgorithmType) {
|
|
@@ -866,7 +866,13 @@ const GroupRole = {
|
|
|
866
866
|
ZEALOT: 'zealot',
|
|
867
867
|
ZENYTE: 'zenyte'
|
|
868
868
|
};
|
|
869
|
-
Object.values(GroupRole);
|
|
869
|
+
const GROUP_ROLES = Object.values(GroupRole);
|
|
870
|
+
|
|
871
|
+
const MemberActivityType = {
|
|
872
|
+
JOINED: 'joined',
|
|
873
|
+
LEFT: 'left',
|
|
874
|
+
CHANGED_ROLE: 'changed_role'
|
|
875
|
+
};
|
|
870
876
|
|
|
871
877
|
var MetricMeasure;
|
|
872
878
|
(function (MetricMeasure) {
|
|
@@ -1002,11 +1008,11 @@ const ComputedMetric = {
|
|
|
1002
1008
|
EHB: 'ehb'
|
|
1003
1009
|
};
|
|
1004
1010
|
const Metric = Object.assign(Object.assign(Object.assign(Object.assign({}, Skill), Activity), Boss), ComputedMetric);
|
|
1005
|
-
Object.values(Metric);
|
|
1011
|
+
const METRICS = Object.values(Metric);
|
|
1006
1012
|
const SKILLS = Object.values(Skill);
|
|
1007
1013
|
const BOSSES = Object.values(Boss);
|
|
1008
1014
|
const ACTIVITIES = Object.values(Activity);
|
|
1009
|
-
Object.values(ComputedMetric);
|
|
1015
|
+
const COMPUTED_METRICS = Object.values(ComputedMetric);
|
|
1010
1016
|
|
|
1011
1017
|
const NameChangeStatus = {
|
|
1012
1018
|
PENDING: 'pending',
|
|
@@ -1021,7 +1027,15 @@ const Period = {
|
|
|
1021
1027
|
MONTH: 'month',
|
|
1022
1028
|
YEAR: 'year'
|
|
1023
1029
|
};
|
|
1024
|
-
Object.values(Period);
|
|
1030
|
+
const PERIODS = Object.values(Period);
|
|
1031
|
+
|
|
1032
|
+
const PlayerAnnotationType = {
|
|
1033
|
+
OPT_OUT: 'opt_out',
|
|
1034
|
+
OPT_OUT_GROUPS: 'opt_out_groups',
|
|
1035
|
+
OPT_OUT_COMPETITIONS: 'opt_out_competitions',
|
|
1036
|
+
BLOCKED: 'blocked',
|
|
1037
|
+
FAKE_F2P: 'fake_f2p'
|
|
1038
|
+
};
|
|
1025
1039
|
|
|
1026
1040
|
const PlayerBuild = {
|
|
1027
1041
|
MAIN: 'main',
|
|
@@ -1032,7 +1046,7 @@ const PlayerBuild = {
|
|
|
1032
1046
|
DEF1: 'def1',
|
|
1033
1047
|
HP10: 'hp10'
|
|
1034
1048
|
};
|
|
1035
|
-
Object.values(PlayerBuild);
|
|
1049
|
+
const PLAYER_BUILDS = Object.values(PlayerBuild);
|
|
1036
1050
|
|
|
1037
1051
|
const PlayerStatus = {
|
|
1038
1052
|
ACTIVE: 'active',
|
|
@@ -1041,6 +1055,7 @@ const PlayerStatus = {
|
|
|
1041
1055
|
ARCHIVED: 'archived',
|
|
1042
1056
|
BANNED: 'banned'
|
|
1043
1057
|
};
|
|
1058
|
+
const PLAYER_STATUSES = Object.values(PlayerStatus);
|
|
1044
1059
|
|
|
1045
1060
|
const PlayerType = {
|
|
1046
1061
|
UNKNOWN: 'unknown',
|
|
@@ -1049,7 +1064,7 @@ const PlayerType = {
|
|
|
1049
1064
|
HARDCORE: 'hardcore',
|
|
1050
1065
|
ULTIMATE: 'ultimate'
|
|
1051
1066
|
};
|
|
1052
|
-
Object.values(PlayerType);
|
|
1067
|
+
const PLAYER_TYPES = Object.values(PlayerType);
|
|
1053
1068
|
|
|
1054
1069
|
class EfficiencyClient extends BaseAPIClient {
|
|
1055
1070
|
/**
|
|
@@ -2212,4 +2227,4 @@ function isPlayerType(typeString) {
|
|
|
2212
2227
|
return typeString in PlayerTypeProps;
|
|
2213
2228
|
}
|
|
2214
2229
|
|
|
2215
|
-
export { ActivityProps, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, CompetitionCSVTableType, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, ComputedMetricProps, Country, CountryProps, EfficiencyAlgorithmType, F2P_BOSSES, GroupRole, GroupRoleProps, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, Metric, MetricProps, NameChangeStatus, PRIVILEGED_GROUP_ROLES, Period, PeriodProps, PlayerBuild, PlayerBuildProps, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, SKILL_EXP_AT_99, SkillProps, WOMClient, findCountry, findCountryByCode, findCountryByName, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill };
|
|
2230
|
+
export { ACTIVITIES, Activity, ActivityProps, BOSSES, Boss, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, CompetitionCSVTableType, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, ComputedMetric, ComputedMetricProps, Country, CountryProps, EfficiencyAlgorithmType, F2P_BOSSES, GROUP_ROLES, GroupRole, GroupRoleProps, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, MemberActivityType, Metric, MetricMeasure, MetricProps, MetricType, NameChangeStatus, PERIODS, PLAYER_BUILDS, PLAYER_STATUSES, PLAYER_TYPES, PRIVILEGED_GROUP_ROLES, Period, PeriodProps, PlayerAnnotationType, PlayerBuild, PlayerBuildProps, PlayerStatus, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, SKILLS, SKILL_EXP_AT_99, Skill, SkillProps, WOMClient, findCountry, findCountryByCode, findCountryByName, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill };
|
package/dist/index.d.ts
CHANGED
|
@@ -246,6 +246,245 @@ declare const Metric: {
|
|
|
246
246
|
readonly CONSTRUCTION: "construction";
|
|
247
247
|
};
|
|
248
248
|
type Metric = (typeof Metric)[keyof typeof Metric];
|
|
249
|
+
declare const METRICS: Metric[];
|
|
250
|
+
declare const SKILLS: Skill[];
|
|
251
|
+
declare const BOSSES: Boss[];
|
|
252
|
+
declare const ACTIVITIES: Activity[];
|
|
253
|
+
declare const COMPUTED_METRICS: ComputedMetric[];
|
|
254
|
+
|
|
255
|
+
interface Snapshot {
|
|
256
|
+
id: number;
|
|
257
|
+
playerId: number;
|
|
258
|
+
importedAt: Date | null;
|
|
259
|
+
createdAt: Date;
|
|
260
|
+
overallRank: number;
|
|
261
|
+
overallExperience: number;
|
|
262
|
+
attackRank: number;
|
|
263
|
+
attackExperience: number;
|
|
264
|
+
defenceRank: number;
|
|
265
|
+
defenceExperience: number;
|
|
266
|
+
strengthRank: number;
|
|
267
|
+
strengthExperience: number;
|
|
268
|
+
hitpointsRank: number;
|
|
269
|
+
hitpointsExperience: number;
|
|
270
|
+
rangedRank: number;
|
|
271
|
+
rangedExperience: number;
|
|
272
|
+
prayerRank: number;
|
|
273
|
+
prayerExperience: number;
|
|
274
|
+
magicRank: number;
|
|
275
|
+
magicExperience: number;
|
|
276
|
+
cookingRank: number;
|
|
277
|
+
cookingExperience: number;
|
|
278
|
+
woodcuttingRank: number;
|
|
279
|
+
woodcuttingExperience: number;
|
|
280
|
+
fletchingRank: number;
|
|
281
|
+
fletchingExperience: number;
|
|
282
|
+
fishingRank: number;
|
|
283
|
+
fishingExperience: number;
|
|
284
|
+
firemakingRank: number;
|
|
285
|
+
firemakingExperience: number;
|
|
286
|
+
craftingRank: number;
|
|
287
|
+
craftingExperience: number;
|
|
288
|
+
smithingRank: number;
|
|
289
|
+
smithingExperience: number;
|
|
290
|
+
miningRank: number;
|
|
291
|
+
miningExperience: number;
|
|
292
|
+
herbloreRank: number;
|
|
293
|
+
herbloreExperience: number;
|
|
294
|
+
agilityRank: number;
|
|
295
|
+
agilityExperience: number;
|
|
296
|
+
thievingRank: number;
|
|
297
|
+
thievingExperience: number;
|
|
298
|
+
slayerRank: number;
|
|
299
|
+
slayerExperience: number;
|
|
300
|
+
farmingRank: number;
|
|
301
|
+
farmingExperience: number;
|
|
302
|
+
runecraftingRank: number;
|
|
303
|
+
runecraftingExperience: number;
|
|
304
|
+
hunterRank: number;
|
|
305
|
+
hunterExperience: number;
|
|
306
|
+
constructionRank: number;
|
|
307
|
+
constructionExperience: number;
|
|
308
|
+
league_pointsRank: number;
|
|
309
|
+
league_pointsScore: number;
|
|
310
|
+
bounty_hunter_hunterRank: number;
|
|
311
|
+
bounty_hunter_hunterScore: number;
|
|
312
|
+
bounty_hunter_rogueRank: number;
|
|
313
|
+
bounty_hunter_rogueScore: number;
|
|
314
|
+
clue_scrolls_allRank: number;
|
|
315
|
+
clue_scrolls_allScore: number;
|
|
316
|
+
clue_scrolls_beginnerRank: number;
|
|
317
|
+
clue_scrolls_beginnerScore: number;
|
|
318
|
+
clue_scrolls_easyRank: number;
|
|
319
|
+
clue_scrolls_easyScore: number;
|
|
320
|
+
clue_scrolls_mediumRank: number;
|
|
321
|
+
clue_scrolls_mediumScore: number;
|
|
322
|
+
clue_scrolls_hardRank: number;
|
|
323
|
+
clue_scrolls_hardScore: number;
|
|
324
|
+
clue_scrolls_eliteRank: number;
|
|
325
|
+
clue_scrolls_eliteScore: number;
|
|
326
|
+
clue_scrolls_masterRank: number;
|
|
327
|
+
clue_scrolls_masterScore: number;
|
|
328
|
+
last_man_standingRank: number;
|
|
329
|
+
last_man_standingScore: number;
|
|
330
|
+
pvp_arenaRank: number;
|
|
331
|
+
pvp_arenaScore: number;
|
|
332
|
+
soul_wars_zealRank: number;
|
|
333
|
+
soul_wars_zealScore: number;
|
|
334
|
+
guardians_of_the_riftRank: number;
|
|
335
|
+
guardians_of_the_riftScore: number;
|
|
336
|
+
colosseum_gloryRank: number;
|
|
337
|
+
colosseum_gloryScore: number;
|
|
338
|
+
collections_loggedRank: number;
|
|
339
|
+
collections_loggedScore: number;
|
|
340
|
+
abyssal_sireRank: number;
|
|
341
|
+
abyssal_sireKills: number;
|
|
342
|
+
alchemical_hydraRank: number;
|
|
343
|
+
alchemical_hydraKills: number;
|
|
344
|
+
amoxliatlRank: number;
|
|
345
|
+
amoxliatlKills: number;
|
|
346
|
+
araxxorRank: number;
|
|
347
|
+
araxxorKills: number;
|
|
348
|
+
artioRank: number;
|
|
349
|
+
artioKills: number;
|
|
350
|
+
barrows_chestsRank: number;
|
|
351
|
+
barrows_chestsKills: number;
|
|
352
|
+
bryophytaRank: number;
|
|
353
|
+
bryophytaKills: number;
|
|
354
|
+
cerberusRank: number;
|
|
355
|
+
cerberusKills: number;
|
|
356
|
+
callistoRank: number;
|
|
357
|
+
callistoKills: number;
|
|
358
|
+
calvarionRank: number;
|
|
359
|
+
calvarionKills: number;
|
|
360
|
+
chambers_of_xericRank: number;
|
|
361
|
+
chambers_of_xericKills: number;
|
|
362
|
+
chambers_of_xeric_challenge_modeRank: number;
|
|
363
|
+
chambers_of_xeric_challenge_modeKills: number;
|
|
364
|
+
chaos_elementalRank: number;
|
|
365
|
+
chaos_elementalKills: number;
|
|
366
|
+
chaos_fanaticRank: number;
|
|
367
|
+
chaos_fanaticKills: number;
|
|
368
|
+
commander_zilyanaRank: number;
|
|
369
|
+
commander_zilyanaKills: number;
|
|
370
|
+
corporeal_beastRank: number;
|
|
371
|
+
corporeal_beastKills: number;
|
|
372
|
+
crazy_archaeologistRank: number;
|
|
373
|
+
crazy_archaeologistKills: number;
|
|
374
|
+
dagannoth_primeRank: number;
|
|
375
|
+
dagannoth_primeKills: number;
|
|
376
|
+
dagannoth_rexRank: number;
|
|
377
|
+
dagannoth_rexKills: number;
|
|
378
|
+
dagannoth_supremeRank: number;
|
|
379
|
+
dagannoth_supremeKills: number;
|
|
380
|
+
deranged_archaeologistRank: number;
|
|
381
|
+
deranged_archaeologistKills: number;
|
|
382
|
+
doom_of_mokhaiotlRank: number;
|
|
383
|
+
doom_of_mokhaiotlKills: number;
|
|
384
|
+
duke_sucellusRank: number;
|
|
385
|
+
duke_sucellusKills: number;
|
|
386
|
+
general_graardorRank: number;
|
|
387
|
+
general_graardorKills: number;
|
|
388
|
+
giant_moleRank: number;
|
|
389
|
+
giant_moleKills: number;
|
|
390
|
+
grotesque_guardiansRank: number;
|
|
391
|
+
grotesque_guardiansKills: number;
|
|
392
|
+
hesporiRank: number;
|
|
393
|
+
hesporiKills: number;
|
|
394
|
+
kalphite_queenRank: number;
|
|
395
|
+
kalphite_queenKills: number;
|
|
396
|
+
king_black_dragonRank: number;
|
|
397
|
+
king_black_dragonKills: number;
|
|
398
|
+
krakenRank: number;
|
|
399
|
+
krakenKills: number;
|
|
400
|
+
kreearraRank: number;
|
|
401
|
+
kreearraKills: number;
|
|
402
|
+
kril_tsutsarothRank: number;
|
|
403
|
+
kril_tsutsarothKills: number;
|
|
404
|
+
lunar_chestsRank: number;
|
|
405
|
+
lunar_chestsKills: number;
|
|
406
|
+
mimicRank: number;
|
|
407
|
+
mimicKills: number;
|
|
408
|
+
nexRank: number;
|
|
409
|
+
nexKills: number;
|
|
410
|
+
nightmareRank: number;
|
|
411
|
+
nightmareKills: number;
|
|
412
|
+
phosanis_nightmareRank: number;
|
|
413
|
+
phosanis_nightmareKills: number;
|
|
414
|
+
oborRank: number;
|
|
415
|
+
oborKills: number;
|
|
416
|
+
phantom_muspahRank: number;
|
|
417
|
+
phantom_muspahKills: number;
|
|
418
|
+
sarachnisRank: number;
|
|
419
|
+
sarachnisKills: number;
|
|
420
|
+
scorpiaRank: number;
|
|
421
|
+
scorpiaKills: number;
|
|
422
|
+
scurriusRank: number;
|
|
423
|
+
scurriusKills: number;
|
|
424
|
+
skotizoRank: number;
|
|
425
|
+
skotizoKills: number;
|
|
426
|
+
sol_hereditRank: number;
|
|
427
|
+
sol_hereditKills: number;
|
|
428
|
+
spindelRank: number;
|
|
429
|
+
spindelKills: number;
|
|
430
|
+
temporossRank: number;
|
|
431
|
+
temporossKills: number;
|
|
432
|
+
the_gauntletRank: number;
|
|
433
|
+
the_gauntletKills: number;
|
|
434
|
+
the_corrupted_gauntletRank: number;
|
|
435
|
+
the_corrupted_gauntletKills: number;
|
|
436
|
+
the_hueycoatlRank: number;
|
|
437
|
+
the_hueycoatlKills: number;
|
|
438
|
+
the_leviathanRank: number;
|
|
439
|
+
the_leviathanKills: number;
|
|
440
|
+
the_royal_titansRank: number;
|
|
441
|
+
the_royal_titansKills: number;
|
|
442
|
+
the_whispererRank: number;
|
|
443
|
+
the_whispererKills: number;
|
|
444
|
+
theatre_of_bloodRank: number;
|
|
445
|
+
theatre_of_bloodKills: number;
|
|
446
|
+
theatre_of_blood_hard_modeRank: number;
|
|
447
|
+
theatre_of_blood_hard_modeKills: number;
|
|
448
|
+
thermonuclear_smoke_devilRank: number;
|
|
449
|
+
thermonuclear_smoke_devilKills: number;
|
|
450
|
+
tombs_of_amascutRank: number;
|
|
451
|
+
tombs_of_amascutKills: number;
|
|
452
|
+
tombs_of_amascut_expertRank: number;
|
|
453
|
+
tombs_of_amascut_expertKills: number;
|
|
454
|
+
tzkal_zukRank: number;
|
|
455
|
+
tzkal_zukKills: number;
|
|
456
|
+
tztok_jadRank: number;
|
|
457
|
+
tztok_jadKills: number;
|
|
458
|
+
vardorvisRank: number;
|
|
459
|
+
vardorvisKills: number;
|
|
460
|
+
venenatisRank: number;
|
|
461
|
+
venenatisKills: number;
|
|
462
|
+
vetionRank: number;
|
|
463
|
+
vetionKills: number;
|
|
464
|
+
vorkathRank: number;
|
|
465
|
+
vorkathKills: number;
|
|
466
|
+
wintertodtRank: number;
|
|
467
|
+
wintertodtKills: number;
|
|
468
|
+
yamaRank: number;
|
|
469
|
+
yamaKills: number;
|
|
470
|
+
zalcanoRank: number;
|
|
471
|
+
zalcanoKills: number;
|
|
472
|
+
zulrahRank: number;
|
|
473
|
+
zulrahKills: number;
|
|
474
|
+
ehpRank: number;
|
|
475
|
+
ehpValue: number;
|
|
476
|
+
ehbRank: number;
|
|
477
|
+
ehbValue: number;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
interface AchievementDefinition {
|
|
481
|
+
name: string;
|
|
482
|
+
metric: Metric;
|
|
483
|
+
measure: string;
|
|
484
|
+
threshold: number;
|
|
485
|
+
validate: (snapshot: Snapshot) => boolean;
|
|
486
|
+
getCurrentValue: (snapshot: Snapshot) => number;
|
|
487
|
+
}
|
|
249
488
|
|
|
250
489
|
declare enum MetricMeasure {
|
|
251
490
|
EXPERIENCE = "experience",
|
|
@@ -281,6 +520,7 @@ declare enum CompetitionStatus {
|
|
|
281
520
|
ONGOING = "ongoing",
|
|
282
521
|
FINISHED = "finished"
|
|
283
522
|
}
|
|
523
|
+
declare const COMPETITION_STATUSES: CompetitionStatus[];
|
|
284
524
|
|
|
285
525
|
interface CompetitionTeam {
|
|
286
526
|
name: string;
|
|
@@ -292,6 +532,7 @@ declare const CompetitionType: {
|
|
|
292
532
|
readonly TEAM: "team";
|
|
293
533
|
};
|
|
294
534
|
type CompetitionType = (typeof CompetitionType)[keyof typeof CompetitionType];
|
|
535
|
+
declare const COMPETITION_TYPES: CompetitionType[];
|
|
295
536
|
|
|
296
537
|
interface Competition {
|
|
297
538
|
id: number;
|
|
@@ -564,6 +805,7 @@ declare const Country: {
|
|
|
564
805
|
readonly ZW: "ZW";
|
|
565
806
|
};
|
|
566
807
|
type Country = (typeof Country)[keyof typeof Country];
|
|
808
|
+
declare const COUNTRY_CODES: Country[];
|
|
567
809
|
|
|
568
810
|
declare const Period: {
|
|
569
811
|
readonly FIVE_MIN: "five_min";
|
|
@@ -573,6 +815,124 @@ declare const Period: {
|
|
|
573
815
|
readonly YEAR: "year";
|
|
574
816
|
};
|
|
575
817
|
type Period = (typeof Period)[keyof typeof Period];
|
|
818
|
+
declare const PERIODS: ("five_min" | "day" | "week" | "month" | "year")[];
|
|
819
|
+
|
|
820
|
+
interface Delta {
|
|
821
|
+
playerId: number;
|
|
822
|
+
period: Period;
|
|
823
|
+
startedAt: Date;
|
|
824
|
+
endedAt: Date;
|
|
825
|
+
updatedAt: Date | null;
|
|
826
|
+
overall: number;
|
|
827
|
+
attack: number;
|
|
828
|
+
defence: number;
|
|
829
|
+
strength: number;
|
|
830
|
+
hitpoints: number;
|
|
831
|
+
ranged: number;
|
|
832
|
+
prayer: number;
|
|
833
|
+
magic: number;
|
|
834
|
+
cooking: number;
|
|
835
|
+
woodcutting: number;
|
|
836
|
+
fletching: number;
|
|
837
|
+
fishing: number;
|
|
838
|
+
firemaking: number;
|
|
839
|
+
crafting: number;
|
|
840
|
+
smithing: number;
|
|
841
|
+
mining: number;
|
|
842
|
+
herblore: number;
|
|
843
|
+
agility: number;
|
|
844
|
+
thieving: number;
|
|
845
|
+
slayer: number;
|
|
846
|
+
farming: number;
|
|
847
|
+
runecrafting: number;
|
|
848
|
+
hunter: number;
|
|
849
|
+
construction: number;
|
|
850
|
+
abyssal_sire: number;
|
|
851
|
+
alchemical_hydra: number;
|
|
852
|
+
amoxliatl: number;
|
|
853
|
+
araxxor: number;
|
|
854
|
+
artio: number;
|
|
855
|
+
barrows_chests: number;
|
|
856
|
+
bryophyta: number;
|
|
857
|
+
callisto: number;
|
|
858
|
+
calvarion: number;
|
|
859
|
+
cerberus: number;
|
|
860
|
+
chambers_of_xeric: number;
|
|
861
|
+
chambers_of_xeric_challenge_mode: number;
|
|
862
|
+
chaos_elemental: number;
|
|
863
|
+
chaos_fanatic: number;
|
|
864
|
+
commander_zilyana: number;
|
|
865
|
+
corporeal_beast: number;
|
|
866
|
+
crazy_archaeologist: number;
|
|
867
|
+
dagannoth_prime: number;
|
|
868
|
+
dagannoth_rex: number;
|
|
869
|
+
dagannoth_supreme: number;
|
|
870
|
+
deranged_archaeologist: number;
|
|
871
|
+
doom_of_mokhaiotl: number;
|
|
872
|
+
duke_sucellus: number;
|
|
873
|
+
general_graardor: number;
|
|
874
|
+
giant_mole: number;
|
|
875
|
+
grotesque_guardians: number;
|
|
876
|
+
hespori: number;
|
|
877
|
+
kalphite_queen: number;
|
|
878
|
+
king_black_dragon: number;
|
|
879
|
+
kraken: number;
|
|
880
|
+
kreearra: number;
|
|
881
|
+
kril_tsutsaroth: number;
|
|
882
|
+
lunar_chests: number;
|
|
883
|
+
mimic: number;
|
|
884
|
+
nex: number;
|
|
885
|
+
nightmare: number;
|
|
886
|
+
phosanis_nightmare: number;
|
|
887
|
+
obor: number;
|
|
888
|
+
phantom_muspah: number;
|
|
889
|
+
sarachnis: number;
|
|
890
|
+
scorpia: number;
|
|
891
|
+
scurrius: number;
|
|
892
|
+
skotizo: number;
|
|
893
|
+
sol_heredit: number;
|
|
894
|
+
spindel: number;
|
|
895
|
+
tempoross: number;
|
|
896
|
+
the_gauntlet: number;
|
|
897
|
+
the_corrupted_gauntlet: number;
|
|
898
|
+
the_hueycoatl: number;
|
|
899
|
+
the_leviathan: number;
|
|
900
|
+
the_royal_titans: number;
|
|
901
|
+
the_whisperer: number;
|
|
902
|
+
theatre_of_blood: number;
|
|
903
|
+
theatre_of_blood_hard_mode: number;
|
|
904
|
+
thermonuclear_smoke_devil: number;
|
|
905
|
+
tombs_of_amascut: number;
|
|
906
|
+
tombs_of_amascut_expert: number;
|
|
907
|
+
tzkal_zuk: number;
|
|
908
|
+
tztok_jad: number;
|
|
909
|
+
vardorvis: number;
|
|
910
|
+
venenatis: number;
|
|
911
|
+
vetion: number;
|
|
912
|
+
vorkath: number;
|
|
913
|
+
wintertodt: number;
|
|
914
|
+
yama: number;
|
|
915
|
+
zalcano: number;
|
|
916
|
+
zulrah: number;
|
|
917
|
+
league_points: number;
|
|
918
|
+
bounty_hunter_hunter: number;
|
|
919
|
+
bounty_hunter_rogue: number;
|
|
920
|
+
clue_scrolls_all: number;
|
|
921
|
+
clue_scrolls_beginner: number;
|
|
922
|
+
clue_scrolls_easy: number;
|
|
923
|
+
clue_scrolls_medium: number;
|
|
924
|
+
clue_scrolls_hard: number;
|
|
925
|
+
clue_scrolls_elite: number;
|
|
926
|
+
clue_scrolls_master: number;
|
|
927
|
+
last_man_standing: number;
|
|
928
|
+
pvp_arena: number;
|
|
929
|
+
soul_wars_zeal: number;
|
|
930
|
+
guardians_of_the_rift: number;
|
|
931
|
+
colosseum_glory: number;
|
|
932
|
+
collections_logged: number;
|
|
933
|
+
ehp: number;
|
|
934
|
+
ehb: number;
|
|
935
|
+
}
|
|
576
936
|
|
|
577
937
|
declare enum EfficiencyAlgorithmType {
|
|
578
938
|
MAIN = "main",
|
|
@@ -858,6 +1218,7 @@ declare const GroupRole: {
|
|
|
858
1218
|
readonly ZENYTE: "zenyte";
|
|
859
1219
|
};
|
|
860
1220
|
type GroupRole = (typeof GroupRole)[keyof typeof GroupRole];
|
|
1221
|
+
declare const GROUP_ROLES: GroupRole[];
|
|
861
1222
|
|
|
862
1223
|
interface GroupRoleOrder {
|
|
863
1224
|
groupId: number;
|
|
@@ -987,6 +1348,17 @@ interface Participation {
|
|
|
987
1348
|
updatedAt: Date;
|
|
988
1349
|
}
|
|
989
1350
|
|
|
1351
|
+
interface Patron {
|
|
1352
|
+
id: string;
|
|
1353
|
+
name: string;
|
|
1354
|
+
email: string;
|
|
1355
|
+
discordId: string | null;
|
|
1356
|
+
groupId: number | null;
|
|
1357
|
+
playerId: number | null;
|
|
1358
|
+
tier: number;
|
|
1359
|
+
createdAt: Date;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
990
1362
|
declare const PlayerAnnotationType: {
|
|
991
1363
|
readonly OPT_OUT: "opt_out";
|
|
992
1364
|
readonly OPT_OUT_GROUPS: "opt_out_groups";
|
|
@@ -1021,6 +1393,7 @@ declare const PlayerBuild: {
|
|
|
1021
1393
|
readonly HP10: "hp10";
|
|
1022
1394
|
};
|
|
1023
1395
|
type PlayerBuild = (typeof PlayerBuild)[keyof typeof PlayerBuild];
|
|
1396
|
+
declare const PLAYER_BUILDS: PlayerBuild[];
|
|
1024
1397
|
|
|
1025
1398
|
declare const PlayerStatus: {
|
|
1026
1399
|
readonly ACTIVE: "active";
|
|
@@ -1030,6 +1403,7 @@ declare const PlayerStatus: {
|
|
|
1030
1403
|
readonly BANNED: "banned";
|
|
1031
1404
|
};
|
|
1032
1405
|
type PlayerStatus = (typeof PlayerStatus)[keyof typeof PlayerStatus];
|
|
1406
|
+
declare const PLAYER_STATUSES: PlayerStatus[];
|
|
1033
1407
|
|
|
1034
1408
|
declare const PlayerType: {
|
|
1035
1409
|
readonly UNKNOWN: "unknown";
|
|
@@ -1039,6 +1413,7 @@ declare const PlayerType: {
|
|
|
1039
1413
|
readonly ULTIMATE: "ultimate";
|
|
1040
1414
|
};
|
|
1041
1415
|
type PlayerType = (typeof PlayerType)[keyof typeof PlayerType];
|
|
1416
|
+
declare const PLAYER_TYPES: PlayerType[];
|
|
1042
1417
|
|
|
1043
1418
|
interface Player {
|
|
1044
1419
|
id: number;
|
|
@@ -3553,4 +3928,4 @@ declare const PlayerTypeProps: Record<PlayerType, {
|
|
|
3553
3928
|
}>;
|
|
3554
3929
|
declare function isPlayerType(typeString: string): typeString is PlayerType;
|
|
3555
3930
|
|
|
3556
|
-
export { type AchievementProgressResponse, type AchievementResponse, ActivityProps, type BossMetaConfig, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, CompetitionCSVTableType, type CompetitionDetailsResponse, type CompetitionResponse, CompetitionStatus, CompetitionStatusProps, type CompetitionTeam, CompetitionType, CompetitionTypeProps, ComputedMetricProps, Country, CountryProps, type CreateCompetitionPayload, type CreateGroupPayload, type EditCompetitionPayload, type EditGroupPayload, EfficiencyAlgorithmType, F2P_BOSSES, type GenericCountMessageResponse, type GenericMessageResponse, type GroupDetailsResponse, type GroupHiscoresEntryResponse, type GroupResponse, GroupRole, GroupRoleProps, type GroupStatisticsResponse, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, type MemberActivityResponse, type MembershipResponse, Metric, type MetricDelta, MetricProps, type NameChangeResponse, NameChangeStatus, PRIVILEGED_GROUP_ROLES, type ParticipantHistoryResponse, type ParticipationResponse, Period, PeriodProps, type PlayerArchiveResponse, PlayerBuild, PlayerBuildProps, type PlayerCompetitionStandingResponse, type PlayerDeltasMapResponse, type PlayerDetailsResponse, type PlayerResponse, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, type RecordResponse, SKILL_EXP_AT_99, type SkillMetaConfig, SkillProps, type SnapshotResponse, type TimeRangeFilter, WOMClient, findCountry, findCountryByCode, findCountryByName, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill };
|
|
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 };
|
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.1",
|
|
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",
|