@wise-old-man/utils 3.3.3 → 3.3.5

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.
@@ -557,6 +557,7 @@ const Activity = {
557
557
  const Boss = {
558
558
  ABYSSAL_SIRE: 'abyssal_sire',
559
559
  ALCHEMICAL_HYDRA: 'alchemical_hydra',
560
+ ARAXXOR: 'araxxor',
560
561
  ARTIO: 'artio',
561
562
  BARROWS_CHESTS: 'barrows_chests',
562
563
  BRYOPHYTA: 'bryophyta',
@@ -1900,6 +1901,7 @@ const SkillProps = mapValues({
1900
1901
  const BossProps = mapValues({
1901
1902
  [Boss.ABYSSAL_SIRE]: { name: 'Abyssal Sire' },
1902
1903
  [Boss.ALCHEMICAL_HYDRA]: { name: 'Alchemical Hydra' },
1904
+ [Boss.ARAXXOR]: { name: 'Araxxor' },
1903
1905
  [Boss.ARTIO]: { name: 'Artio' },
1904
1906
  [Boss.BARROWS_CHESTS]: { name: 'Barrows Chests' },
1905
1907
  [Boss.BRYOPHYTA]: { name: 'Bryophyta', isMembers: false },
@@ -2149,10 +2151,10 @@ function formatNumber(num, withLetters = false, decimalPrecision = 2) {
2149
2151
  return -1;
2150
2152
  // If number is float
2151
2153
  if (num % 1 !== 0) {
2152
- return (Math.round(num * 100) / 100).toLocaleString();
2154
+ return (Math.round(num * 100) / 100).toLocaleString('en-US');
2153
2155
  }
2154
2156
  if ((num < 10000 && num > -10000) || !withLetters) {
2155
- return num.toLocaleString();
2157
+ return num.toLocaleString('en-US');
2156
2158
  }
2157
2159
  // < 100k
2158
2160
  if (num < 100000 && num > -100000) {
package/dist/es/index.js CHANGED
@@ -555,6 +555,7 @@ const Activity = {
555
555
  const Boss = {
556
556
  ABYSSAL_SIRE: 'abyssal_sire',
557
557
  ALCHEMICAL_HYDRA: 'alchemical_hydra',
558
+ ARAXXOR: 'araxxor',
558
559
  ARTIO: 'artio',
559
560
  BARROWS_CHESTS: 'barrows_chests',
560
561
  BRYOPHYTA: 'bryophyta',
@@ -1898,6 +1899,7 @@ const SkillProps = mapValues({
1898
1899
  const BossProps = mapValues({
1899
1900
  [Boss.ABYSSAL_SIRE]: { name: 'Abyssal Sire' },
1900
1901
  [Boss.ALCHEMICAL_HYDRA]: { name: 'Alchemical Hydra' },
1902
+ [Boss.ARAXXOR]: { name: 'Araxxor' },
1901
1903
  [Boss.ARTIO]: { name: 'Artio' },
1902
1904
  [Boss.BARROWS_CHESTS]: { name: 'Barrows Chests' },
1903
1905
  [Boss.BRYOPHYTA]: { name: 'Bryophyta', isMembers: false },
@@ -2147,10 +2149,10 @@ function formatNumber(num, withLetters = false, decimalPrecision = 2) {
2147
2149
  return -1;
2148
2150
  // If number is float
2149
2151
  if (num % 1 !== 0) {
2150
- return (Math.round(num * 100) / 100).toLocaleString();
2152
+ return (Math.round(num * 100) / 100).toLocaleString('en-US');
2151
2153
  }
2152
2154
  if ((num < 10000 && num > -10000) || !withLetters) {
2153
- return num.toLocaleString();
2155
+ return num.toLocaleString('en-US');
2154
2156
  }
2155
2157
  // < 100k
2156
2158
  if (num < 100000 && num > -100000) {
package/dist/es/index.mjs CHANGED
@@ -555,6 +555,7 @@ const Activity = {
555
555
  const Boss = {
556
556
  ABYSSAL_SIRE: 'abyssal_sire',
557
557
  ALCHEMICAL_HYDRA: 'alchemical_hydra',
558
+ ARAXXOR: 'araxxor',
558
559
  ARTIO: 'artio',
559
560
  BARROWS_CHESTS: 'barrows_chests',
560
561
  BRYOPHYTA: 'bryophyta',
@@ -1898,6 +1899,7 @@ const SkillProps = mapValues({
1898
1899
  const BossProps = mapValues({
1899
1900
  [Boss.ABYSSAL_SIRE]: { name: 'Abyssal Sire' },
1900
1901
  [Boss.ALCHEMICAL_HYDRA]: { name: 'Alchemical Hydra' },
1902
+ [Boss.ARAXXOR]: { name: 'Araxxor' },
1901
1903
  [Boss.ARTIO]: { name: 'Artio' },
1902
1904
  [Boss.BARROWS_CHESTS]: { name: 'Barrows Chests' },
1903
1905
  [Boss.BRYOPHYTA]: { name: 'Bryophyta', isMembers: false },
@@ -2147,10 +2149,10 @@ function formatNumber(num, withLetters = false, decimalPrecision = 2) {
2147
2149
  return -1;
2148
2150
  // If number is float
2149
2151
  if (num % 1 !== 0) {
2150
- return (Math.round(num * 100) / 100).toLocaleString();
2152
+ return (Math.round(num * 100) / 100).toLocaleString('en-US');
2151
2153
  }
2152
2154
  if ((num < 10000 && num > -10000) || !withLetters) {
2153
- return num.toLocaleString();
2155
+ return num.toLocaleString('en-US');
2154
2156
  }
2155
2157
  // < 100k
2156
2158
  if (num < 100000 && num > -100000) {
package/dist/index.d.ts CHANGED
@@ -49,7 +49,7 @@ export type Membership = {
49
49
  updatedAt: Date;
50
50
  };
51
51
 
52
- export type Group = {
52
+ export type Prisma_Base_Group = {
53
53
  id: number;
54
54
  name: string;
55
55
  clanChat: string | null;
@@ -64,6 +64,7 @@ export type Group = {
64
64
  verificationHash: string;
65
65
  createdAt: Date;
66
66
  updatedAt: Date;
67
+ creatorIpHash: string | null;
67
68
  };
68
69
 
69
70
  export type GroupRoleOrder = {
@@ -81,7 +82,7 @@ type Participation = {
81
82
  updatedAt: Date;
82
83
  };
83
84
 
84
- type Competition = {
85
+ type Prisma_Base_Competition = {
85
86
  id: number;
86
87
  title: string;
87
88
  metric: Metric;
@@ -94,6 +95,7 @@ type Competition = {
94
95
  verificationHash: string;
95
96
  createdAt: Date | null;
96
97
  updatedAt: Date | null;
98
+ creatorIpHash: string | null;
97
99
  };
98
100
 
99
101
  type Prisma_Base_NameChange = {
@@ -423,6 +425,7 @@ type Activity = (typeof Activity)[keyof typeof Activity];
423
425
  declare const Boss: {
424
426
  readonly ABYSSAL_SIRE: "abyssal_sire";
425
427
  readonly ALCHEMICAL_HYDRA: "alchemical_hydra";
428
+ readonly ARAXXOR: "araxxor";
426
429
  readonly ARTIO: "artio";
427
430
  readonly BARROWS_CHESTS: "barrows_chests";
428
431
  readonly BRYOPHYTA: "bryophyta";
@@ -494,6 +497,7 @@ declare const Metric: {
494
497
  readonly EHB: "ehb";
495
498
  readonly ABYSSAL_SIRE: "abyssal_sire";
496
499
  readonly ALCHEMICAL_HYDRA: "alchemical_hydra";
500
+ readonly ARAXXOR: "araxxor";
497
501
  readonly ARTIO: "artio";
498
502
  readonly BARROWS_CHESTS: "barrows_chests";
499
503
  readonly BRYOPHYTA: "bryophyta";
@@ -1186,6 +1190,8 @@ type Snapshot = Omit<Prisma_Base_Snapshot, 'overallExperience'> & {
1186
1190
  type Player = Omit<Prisma_Base_Player, 'exp' | 'latestSnapshotId'> & {
1187
1191
  exp: number;
1188
1192
  };
1193
+ type Group = Omit<Prisma_Base_Group, 'creatorIpHash'>;
1194
+ type Competition = Omit<Prisma_Base_Competition, 'creatorIpHash'>;
1189
1195
  type NameChange = Omit<Prisma_Base_NameChange, 'reviewContext'> & {
1190
1196
  reviewContext: SkipContext | DenyContext | null;
1191
1197
  };
@@ -1639,6 +1645,7 @@ declare const MetricProps: {
1639
1645
  readonly colosseum_glory: ActivityProperties;
1640
1646
  readonly abyssal_sire: BossProperties;
1641
1647
  readonly alchemical_hydra: BossProperties;
1648
+ readonly araxxor: BossProperties;
1642
1649
  readonly artio: BossProperties;
1643
1650
  readonly barrows_chests: BossProperties;
1644
1651
  readonly bryophyta: BossProperties;
@@ -2244,4 +2251,4 @@ declare class WOMClient extends BaseAPIClient {
2244
2251
  constructor(options?: WOMClientOptions);
2245
2252
  }
2246
2253
 
2247
- export { ACTIVITIES, type Achievement, type AchievementDefinition, type AchievementProgress, type AchievementTemplate, Activity, type ActivityDelta, ActivityType, type ActivityValue, type AssertPlayerTypeResponse, BOSSES, type Bonus, Boss, type BossDelta, type BossMetaConfig, type BossValue, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, type ChangeMemberRolePayload, CompetitionCSVTableType, type CompetitionDetails, type CompetitionDetailsCSVParams, type CompetitionListItem, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, type CompetitionWithParticipations, type CompetitionsSearchFilter, ComputedMetric, type ComputedMetricDelta, type ComputedMetricValue, Country, type CountryDetails, CountryProps, type CreateCompetitionPayload, type CreateCompetitionResponse, type CreateGroupPayload, type CreateGroupResponse, type DeltaGroupLeaderboardEntry, type DeltaLeaderboardEntry, type DeltaLeaderboardFilter, type DenyContext, type EditCompetitionPayload, type EditGroupPayload, EfficiencyAlgorithmType, type EfficiencyAlgorithmTypeUnion, type EfficiencyLeaderboardsFilter, type ExtendedAchievement, type ExtendedAchievementWithPlayer, F2P_BOSSES, type FlaggedPlayerReviewContext, type FormattedSnapshot, GROUP_ROLES, type GenericCountMessageResponse, type GenericMessageResponse, type GetGroupGainsFilter, type GetPlayerGainsResponse, type GroupDetails, type GroupHiscoresActivityItem, type GroupHiscoresBossItem, type GroupHiscoresComputedMetricItem, type GroupHiscoresEntry, type GroupHiscoresSkillItem, type GroupListItem, type GroupMemberFragment, type GroupRecordsFilter, GroupRole, GroupRoleProps, type GroupStatistics, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, type MapOf, type MeasuredDeltaProgress, type MemberActivityWithPlayer, type MemberInput, type MemberJoinedEvent, type MemberLeftEvent, type MemberRoleChangeEvent, type MembershipWithGroup, type MembershipWithPlayer, Metric, type MetricLeaders, MetricMeasure, MetricProps, MetricType, type MetricValueKey, type NameChange, type NameChangeDetails, NameChangeStatus, type NameChangeWithPlayer, type NameChangesSearchFilter, PERIODS, PLAYER_BUILDS, PLAYER_STATUSES, PLAYER_TYPES, PRIVELEGED_GROUP_ROLES, type ParticipationWithCompetition, type ParticipationWithCompetitionAndStandings, type ParticipationWithPlayer, type ParticipationWithPlayerAndProgress, Period, PeriodProps, type Player, type PlayerArchiveWithPlayer, PlayerBuild, PlayerBuildProps, type PlayerCompetitionStandingsFilter, type PlayerCompetitionsFilter, type PlayerDeltasMap, type PlayerDetails, type PlayerRecordsFilter, PlayerStatus, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, type Record, type RecordLeaderboardEntry, type RecordLeaderboardFilter, SKILLS, SKILL_EXP_AT_99, Skill, type SkillDelta, type SkillMetaConfig, type SkillMetaMethod, type SkillValue, type SkipContext, type Snapshot, type SnapshotFragment, type Team, type TimeRangeFilter, type 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, parsePeriodExpression, round };
2254
+ export { ACTIVITIES, type Achievement, type AchievementDefinition, type AchievementProgress, type AchievementTemplate, Activity, type ActivityDelta, ActivityType, type ActivityValue, type AssertPlayerTypeResponse, BOSSES, type Bonus, Boss, type BossDelta, type BossMetaConfig, type BossValue, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, type ChangeMemberRolePayload, CompetitionCSVTableType, type CompetitionDetails, type CompetitionDetailsCSVParams, type CompetitionListItem, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, type CompetitionWithParticipations, type CompetitionsSearchFilter, ComputedMetric, type ComputedMetricDelta, type ComputedMetricValue, Country, type CountryDetails, CountryProps, type CreateCompetitionPayload, type CreateCompetitionResponse, type CreateGroupPayload, type CreateGroupResponse, type DeltaGroupLeaderboardEntry, type DeltaLeaderboardEntry, type DeltaLeaderboardFilter, type DenyContext, type EditCompetitionPayload, type EditGroupPayload, EfficiencyAlgorithmType, type EfficiencyAlgorithmTypeUnion, type EfficiencyLeaderboardsFilter, type ExtendedAchievement, type ExtendedAchievementWithPlayer, F2P_BOSSES, type FlaggedPlayerReviewContext, type FormattedSnapshot, GROUP_ROLES, type GenericCountMessageResponse, type GenericMessageResponse, type GetGroupGainsFilter, type GetPlayerGainsResponse, type Group, type GroupDetails, type GroupHiscoresActivityItem, type GroupHiscoresBossItem, type GroupHiscoresComputedMetricItem, type GroupHiscoresEntry, type GroupHiscoresSkillItem, type GroupListItem, type GroupMemberFragment, type GroupRecordsFilter, GroupRole, GroupRoleProps, type GroupStatistics, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, type MapOf, type MeasuredDeltaProgress, type MemberActivityWithPlayer, type MemberInput, type MemberJoinedEvent, type MemberLeftEvent, type MemberRoleChangeEvent, type MembershipWithGroup, type MembershipWithPlayer, Metric, type MetricLeaders, MetricMeasure, MetricProps, MetricType, type MetricValueKey, type NameChange, type NameChangeDetails, NameChangeStatus, type NameChangeWithPlayer, type NameChangesSearchFilter, PERIODS, PLAYER_BUILDS, PLAYER_STATUSES, PLAYER_TYPES, PRIVELEGED_GROUP_ROLES, type ParticipationWithCompetition, type ParticipationWithCompetitionAndStandings, type ParticipationWithPlayer, type ParticipationWithPlayerAndProgress, Period, PeriodProps, type Player, type PlayerArchiveWithPlayer, PlayerBuild, PlayerBuildProps, type PlayerCompetitionStandingsFilter, type PlayerCompetitionsFilter, type PlayerDeltasMap, type PlayerDetails, type PlayerRecordsFilter, PlayerStatus, PlayerStatusProps, PlayerType, PlayerTypeProps, REAL_METRICS, REAL_SKILLS, type Record, type RecordLeaderboardEntry, type RecordLeaderboardFilter, SKILLS, SKILL_EXP_AT_99, Skill, type SkillDelta, type SkillMetaConfig, type SkillMetaMethod, type SkillValue, type SkipContext, type Snapshot, type SnapshotFragment, type Team, type TimeRangeFilter, type 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, parsePeriodExpression, round };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise-old-man/utils",
3
- "version": "3.3.3",
3
+ "version": "3.3.5",
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",