@wise-old-man/utils 4.0.7 → 4.0.9

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.
@@ -322,6 +322,20 @@ exports.CompetitionStatus = void 0;
322
322
  })(exports.CompetitionStatus || (exports.CompetitionStatus = {}));
323
323
  const COMPETITION_STATUSES = Object.values(exports.CompetitionStatus);
324
324
 
325
+ const CompetitionTimeEventStatus = {
326
+ WAITING: 'waiting',
327
+ EXECUTING: 'executing',
328
+ COMPLETED: 'completed',
329
+ FAILED: 'failed',
330
+ CANCELED: 'canceled'
331
+ };
332
+
333
+ const CompetitionTimeEventType = {
334
+ BEFORE_START: 'before_start',
335
+ BEFORE_END: 'before_end',
336
+ DURING: 'during'
337
+ };
338
+
325
339
  const CompetitionType = {
326
340
  CLASSIC: 'classic',
327
341
  TEAM: 'team'
@@ -406,6 +420,7 @@ const Country = {
406
420
  FR: 'FR',
407
421
  GA: 'GA',
408
422
  GB: 'GB',
423
+ GB_ENG: 'GB_ENG',
409
424
  GB_NIR: 'GB_NIR',
410
425
  GB_SCT: 'GB_SCT',
411
426
  GB_WLS: 'GB_WLS',
@@ -1489,7 +1504,8 @@ const CountryProps = {
1489
1504
  [Country.FR]: { code: 'FR', name: 'France' },
1490
1505
  [Country.GA]: { code: 'GA', name: 'Gabon' },
1491
1506
  [Country.GB]: { code: 'GB', name: 'United Kingdom' },
1492
- [Country.GB_NIR]: { code: 'GB_NIR', name: 'Northen Ireland' },
1507
+ [Country.GB_ENG]: { code: 'GB_ENG', name: 'England' },
1508
+ [Country.GB_NIR]: { code: 'GB_NIR', name: 'Northern Ireland' },
1493
1509
  [Country.GB_SCT]: { code: 'GB_SCT', name: 'Scotland' },
1494
1510
  [Country.GB_WLS]: { code: 'GB_WLS', name: 'Wales' },
1495
1511
  [Country.GD]: { code: 'GD', name: 'Grenada' },
@@ -2319,6 +2335,8 @@ exports.COMPETITION_TYPES = COMPETITION_TYPES;
2319
2335
  exports.COMPUTED_METRICS = COMPUTED_METRICS;
2320
2336
  exports.COUNTRY_CODES = COUNTRY_CODES;
2321
2337
  exports.CompetitionStatusProps = CompetitionStatusProps;
2338
+ exports.CompetitionTimeEventStatus = CompetitionTimeEventStatus;
2339
+ exports.CompetitionTimeEventType = CompetitionTimeEventType;
2322
2340
  exports.CompetitionType = CompetitionType;
2323
2341
  exports.CompetitionTypeProps = CompetitionTypeProps;
2324
2342
  exports.ComputedMetric = ComputedMetric;
package/dist/es/index.js CHANGED
@@ -320,6 +320,20 @@ var CompetitionStatus;
320
320
  })(CompetitionStatus || (CompetitionStatus = {}));
321
321
  const COMPETITION_STATUSES = Object.values(CompetitionStatus);
322
322
 
323
+ const CompetitionTimeEventStatus = {
324
+ WAITING: 'waiting',
325
+ EXECUTING: 'executing',
326
+ COMPLETED: 'completed',
327
+ FAILED: 'failed',
328
+ CANCELED: 'canceled'
329
+ };
330
+
331
+ const CompetitionTimeEventType = {
332
+ BEFORE_START: 'before_start',
333
+ BEFORE_END: 'before_end',
334
+ DURING: 'during'
335
+ };
336
+
323
337
  const CompetitionType = {
324
338
  CLASSIC: 'classic',
325
339
  TEAM: 'team'
@@ -404,6 +418,7 @@ const Country = {
404
418
  FR: 'FR',
405
419
  GA: 'GA',
406
420
  GB: 'GB',
421
+ GB_ENG: 'GB_ENG',
407
422
  GB_NIR: 'GB_NIR',
408
423
  GB_SCT: 'GB_SCT',
409
424
  GB_WLS: 'GB_WLS',
@@ -1487,7 +1502,8 @@ const CountryProps = {
1487
1502
  [Country.FR]: { code: 'FR', name: 'France' },
1488
1503
  [Country.GA]: { code: 'GA', name: 'Gabon' },
1489
1504
  [Country.GB]: { code: 'GB', name: 'United Kingdom' },
1490
- [Country.GB_NIR]: { code: 'GB_NIR', name: 'Northen Ireland' },
1505
+ [Country.GB_ENG]: { code: 'GB_ENG', name: 'England' },
1506
+ [Country.GB_NIR]: { code: 'GB_NIR', name: 'Northern Ireland' },
1491
1507
  [Country.GB_SCT]: { code: 'GB_SCT', name: 'Scotland' },
1492
1508
  [Country.GB_WLS]: { code: 'GB_WLS', name: 'Wales' },
1493
1509
  [Country.GD]: { code: 'GD', name: 'Grenada' },
@@ -2304,4 +2320,4 @@ function roundNumber(num, cases) {
2304
2320
  return Math.round(num * Math.pow(10, cases)) / Math.pow(10, cases);
2305
2321
  }
2306
2322
 
2307
- 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, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill, padNumber, parsePeriodExpression, roundNumber };
2323
+ export { ACTIVITIES, Activity, ActivityProps, BOSSES, Boss, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, CompetitionCSVTableType, CompetitionStatus, CompetitionStatusProps, CompetitionTimeEventStatus, CompetitionTimeEventType, 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, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill, padNumber, parsePeriodExpression, roundNumber };
package/dist/es/index.mjs CHANGED
@@ -320,6 +320,20 @@ var CompetitionStatus;
320
320
  })(CompetitionStatus || (CompetitionStatus = {}));
321
321
  const COMPETITION_STATUSES = Object.values(CompetitionStatus);
322
322
 
323
+ const CompetitionTimeEventStatus = {
324
+ WAITING: 'waiting',
325
+ EXECUTING: 'executing',
326
+ COMPLETED: 'completed',
327
+ FAILED: 'failed',
328
+ CANCELED: 'canceled'
329
+ };
330
+
331
+ const CompetitionTimeEventType = {
332
+ BEFORE_START: 'before_start',
333
+ BEFORE_END: 'before_end',
334
+ DURING: 'during'
335
+ };
336
+
323
337
  const CompetitionType = {
324
338
  CLASSIC: 'classic',
325
339
  TEAM: 'team'
@@ -404,6 +418,7 @@ const Country = {
404
418
  FR: 'FR',
405
419
  GA: 'GA',
406
420
  GB: 'GB',
421
+ GB_ENG: 'GB_ENG',
407
422
  GB_NIR: 'GB_NIR',
408
423
  GB_SCT: 'GB_SCT',
409
424
  GB_WLS: 'GB_WLS',
@@ -1487,7 +1502,8 @@ const CountryProps = {
1487
1502
  [Country.FR]: { code: 'FR', name: 'France' },
1488
1503
  [Country.GA]: { code: 'GA', name: 'Gabon' },
1489
1504
  [Country.GB]: { code: 'GB', name: 'United Kingdom' },
1490
- [Country.GB_NIR]: { code: 'GB_NIR', name: 'Northen Ireland' },
1505
+ [Country.GB_ENG]: { code: 'GB_ENG', name: 'England' },
1506
+ [Country.GB_NIR]: { code: 'GB_NIR', name: 'Northern Ireland' },
1491
1507
  [Country.GB_SCT]: { code: 'GB_SCT', name: 'Scotland' },
1492
1508
  [Country.GB_WLS]: { code: 'GB_WLS', name: 'Wales' },
1493
1509
  [Country.GD]: { code: 'GD', name: 'Grenada' },
@@ -2304,4 +2320,4 @@ function roundNumber(num, cases) {
2304
2320
  return Math.round(num * Math.pow(10, cases)) / Math.pow(10, cases);
2305
2321
  }
2306
2322
 
2307
- 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, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill, padNumber, parsePeriodExpression, roundNumber };
2323
+ export { ACTIVITIES, Activity, ActivityProps, BOSSES, Boss, BossProps, CAPPED_MAX_TOTAL_XP, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, CompetitionCSVTableType, CompetitionStatus, CompetitionStatusProps, CompetitionTimeEventStatus, CompetitionTimeEventType, 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, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill, padNumber, parsePeriodExpression, roundNumber };
package/dist/index.d.ts CHANGED
@@ -563,6 +563,37 @@ interface CompetitionTeam {
563
563
  participants: string[];
564
564
  }
565
565
 
566
+ declare const CompetitionTimeEventStatus: {
567
+ readonly WAITING: "waiting";
568
+ readonly EXECUTING: "executing";
569
+ readonly COMPLETED: "completed";
570
+ readonly FAILED: "failed";
571
+ readonly CANCELED: "canceled";
572
+ };
573
+ type CompetitionTimeEventStatus = (typeof CompetitionTimeEventStatus)[keyof typeof CompetitionTimeEventStatus];
574
+
575
+ declare const CompetitionTimeEventType: {
576
+ readonly BEFORE_START: "before_start";
577
+ readonly BEFORE_END: "before_end";
578
+ readonly DURING: "during";
579
+ };
580
+ type CompetitionTimeEventType = (typeof CompetitionTimeEventType)[keyof typeof CompetitionTimeEventType];
581
+
582
+ interface CompetitionTimeEvent {
583
+ id: number;
584
+ competitionId: number;
585
+ type: CompetitionTimeEventType;
586
+ offsetMinutes: number;
587
+ executeAt: Date;
588
+ status: CompetitionTimeEventStatus;
589
+ attempts: number;
590
+ executingAt: Date | null;
591
+ completedAt: Date | null;
592
+ failedAt: Date | null;
593
+ canceledAt: Date | null;
594
+ createdAt: Date;
595
+ }
596
+
566
597
  declare const CompetitionType: {
567
598
  readonly CLASSIC: "classic";
568
599
  readonly TEAM: "team";
@@ -663,6 +694,7 @@ declare const Country: {
663
694
  readonly FR: "FR";
664
695
  readonly GA: "GA";
665
696
  readonly GB: "GB";
697
+ readonly GB_ENG: "GB_ENG";
666
698
  readonly GB_NIR: "GB_NIR";
667
699
  readonly GB_SCT: "GB_SCT";
668
700
  readonly GB_WLS: "GB_WLS";
@@ -1135,7 +1167,6 @@ interface GroupRoleOrder {
1135
1167
  }
1136
1168
 
1137
1169
  interface GroupSocialLinks {
1138
- id: number;
1139
1170
  groupId: number;
1140
1171
  website: string | null;
1141
1172
  discord: string | null;
@@ -3900,4 +3931,4 @@ declare function isPlayerType(typeString: string): typeString is PlayerType;
3900
3931
 
3901
3932
  declare function roundNumber(num: number, cases: number): number;
3902
3933
 
3903
- 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 CachedDelta, type Competition, CompetitionCSVTableType, type CompetitionDetailsResponse, type CompetitionMetric, type CompetitionResponse, CompetitionStatus, CompetitionStatusProps, type CompetitionTeam, CompetitionType, CompetitionTypeProps, ComputedMetric, ComputedMetricProps, Country, CountryProps, type CreateCompetitionPayload, type CreateGroupPayload, 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, type TrendDatapoint, WOMClient, findCountry, findCountryByCode, findCountryByName, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill, padNumber, parsePeriodExpression, roundNumber };
3934
+ 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 CachedDelta, type Competition, CompetitionCSVTableType, type CompetitionDetailsResponse, type CompetitionMetric, type CompetitionResponse, CompetitionStatus, CompetitionStatusProps, type CompetitionTeam, type CompetitionTimeEvent, CompetitionTimeEventStatus, CompetitionTimeEventType, CompetitionType, CompetitionTypeProps, ComputedMetric, ComputedMetricProps, Country, CountryProps, type CreateCompetitionPayload, type CreateGroupPayload, 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, type TrendDatapoint, WOMClient, findCountry, findCountryByCode, findCountryByName, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMinimumValue, getParentEfficiencyMetric, isActivity, isBoss, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerStatus, isPlayerType, isSkill, padNumber, parsePeriodExpression, roundNumber };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise-old-man/utils",
3
- "version": "4.0.7",
3
+ "version": "4.0.9",
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",