@wise-old-man/utils 4.0.14-league → 4.0.15

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.
@@ -336,6 +336,7 @@ const CompetitionTimeEventStatus = {
336
336
  };
337
337
 
338
338
  const CompetitionTimeEventType = {
339
+ AFTER_START: 'after_start',
339
340
  BEFORE_START: 'before_start',
340
341
  BEFORE_END: 'before_end',
341
342
  DURING: 'during'
@@ -940,7 +941,6 @@ const Skill = {
940
941
  SAILING: 'sailing'
941
942
  };
942
943
  const Activity = {
943
- LEAGUE_POINTS: 'league_points',
944
944
  BOUNTY_HUNTER_HUNTER: 'bounty_hunter_hunter',
945
945
  BOUNTY_HUNTER_ROGUE: 'bounty_hunter_rogue',
946
946
  CLUE_SCROLLS_ALL: 'clue_scrolls_all',
@@ -2191,7 +2191,6 @@ const BossProps = mapValues({
2191
2191
  [Boss.ZULRAH]: { name: 'Zulrah' }
2192
2192
  }, 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 })));
2193
2193
  const ActivityProps = mapValues({
2194
- [Activity.LEAGUE_POINTS]: { name: 'League Points', minimumValue: 100 },
2195
2194
  [Activity.BOUNTY_HUNTER_HUNTER]: { name: 'Bounty Hunter (Hunter)', minimumValue: 2 },
2196
2195
  [Activity.BOUNTY_HUNTER_ROGUE]: { name: 'Bounty Hunter (Rogue)', minimumValue: 2 },
2197
2196
  [Activity.CLUE_SCROLLS_ALL]: { name: 'Clue Scrolls (All)' },
package/dist/es/index.js CHANGED
@@ -334,6 +334,7 @@ const CompetitionTimeEventStatus = {
334
334
  };
335
335
 
336
336
  const CompetitionTimeEventType = {
337
+ AFTER_START: 'after_start',
337
338
  BEFORE_START: 'before_start',
338
339
  BEFORE_END: 'before_end',
339
340
  DURING: 'during'
@@ -938,7 +939,6 @@ const Skill = {
938
939
  SAILING: 'sailing'
939
940
  };
940
941
  const Activity = {
941
- LEAGUE_POINTS: 'league_points',
942
942
  BOUNTY_HUNTER_HUNTER: 'bounty_hunter_hunter',
943
943
  BOUNTY_HUNTER_ROGUE: 'bounty_hunter_rogue',
944
944
  CLUE_SCROLLS_ALL: 'clue_scrolls_all',
@@ -2189,7 +2189,6 @@ const BossProps = mapValues({
2189
2189
  [Boss.ZULRAH]: { name: 'Zulrah' }
2190
2190
  }, 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 })));
2191
2191
  const ActivityProps = mapValues({
2192
- [Activity.LEAGUE_POINTS]: { name: 'League Points', minimumValue: 100 },
2193
2192
  [Activity.BOUNTY_HUNTER_HUNTER]: { name: 'Bounty Hunter (Hunter)', minimumValue: 2 },
2194
2193
  [Activity.BOUNTY_HUNTER_ROGUE]: { name: 'Bounty Hunter (Rogue)', minimumValue: 2 },
2195
2194
  [Activity.CLUE_SCROLLS_ALL]: { name: 'Clue Scrolls (All)' },
package/dist/es/index.mjs CHANGED
@@ -334,6 +334,7 @@ const CompetitionTimeEventStatus = {
334
334
  };
335
335
 
336
336
  const CompetitionTimeEventType = {
337
+ AFTER_START: 'after_start',
337
338
  BEFORE_START: 'before_start',
338
339
  BEFORE_END: 'before_end',
339
340
  DURING: 'during'
@@ -938,7 +939,6 @@ const Skill = {
938
939
  SAILING: 'sailing'
939
940
  };
940
941
  const Activity = {
941
- LEAGUE_POINTS: 'league_points',
942
942
  BOUNTY_HUNTER_HUNTER: 'bounty_hunter_hunter',
943
943
  BOUNTY_HUNTER_ROGUE: 'bounty_hunter_rogue',
944
944
  CLUE_SCROLLS_ALL: 'clue_scrolls_all',
@@ -2189,7 +2189,6 @@ const BossProps = mapValues({
2189
2189
  [Boss.ZULRAH]: { name: 'Zulrah' }
2190
2190
  }, 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 })));
2191
2191
  const ActivityProps = mapValues({
2192
- [Activity.LEAGUE_POINTS]: { name: 'League Points', minimumValue: 100 },
2193
2192
  [Activity.BOUNTY_HUNTER_HUNTER]: { name: 'Bounty Hunter (Hunter)', minimumValue: 2 },
2194
2193
  [Activity.BOUNTY_HUNTER_ROGUE]: { name: 'Bounty Hunter (Rogue)', minimumValue: 2 },
2195
2194
  [Activity.CLUE_SCROLLS_ALL]: { name: 'Clue Scrolls (All)' },
package/dist/index.d.ts CHANGED
@@ -42,7 +42,6 @@ declare const Skill: {
42
42
  };
43
43
  type Skill = (typeof Skill)[keyof typeof Skill];
44
44
  declare const Activity: {
45
- readonly LEAGUE_POINTS: "league_points";
46
45
  readonly BOUNTY_HUNTER_HUNTER: "bounty_hunter_hunter";
47
46
  readonly BOUNTY_HUNTER_ROGUE: "bounty_hunter_rogue";
48
47
  readonly CLUE_SCROLLS_ALL: "clue_scrolls_all";
@@ -209,7 +208,6 @@ declare const Metric: {
209
208
  readonly YAMA: "yama";
210
209
  readonly ZALCANO: "zalcano";
211
210
  readonly ZULRAH: "zulrah";
212
- readonly LEAGUE_POINTS: "league_points";
213
211
  readonly BOUNTY_HUNTER_HUNTER: "bounty_hunter_hunter";
214
212
  readonly BOUNTY_HUNTER_ROGUE: "bounty_hunter_rogue";
215
213
  readonly CLUE_SCROLLS_ALL: "clue_scrolls_all";
@@ -313,8 +311,6 @@ interface Snapshot {
313
311
  constructionExperience: number;
314
312
  sailingRank: number;
315
313
  sailingExperience: number;
316
- league_pointsRank: number;
317
- league_pointsScore: number;
318
314
  bounty_hunter_hunterRank: number;
319
315
  bounty_hunter_hunterScore: number;
320
316
  bounty_hunter_rogueRank: number;
@@ -576,6 +572,7 @@ declare const CompetitionTimeEventStatus: {
576
572
  type CompetitionTimeEventStatus = (typeof CompetitionTimeEventStatus)[keyof typeof CompetitionTimeEventStatus];
577
573
 
578
574
  declare const CompetitionTimeEventType: {
575
+ readonly AFTER_START: "after_start";
579
576
  readonly BEFORE_START: "before_start";
580
577
  readonly BEFORE_END: "before_end";
581
578
  readonly DURING: "during";
@@ -1293,7 +1290,7 @@ interface Participation {
1293
1290
  interface Patron {
1294
1291
  id: string;
1295
1292
  name: string;
1296
- email: string;
1293
+ email: string | null;
1297
1294
  discordId: string | null;
1298
1295
  groupId: number | null;
1299
1296
  playerId: number | null;
@@ -1376,9 +1373,6 @@ interface Player {
1376
1373
  lastChangedAt: Date | null;
1377
1374
  lastImportedAt: Date | null;
1378
1375
  latestSnapshotDate: Date | null;
1379
- leaguePoints: number;
1380
- leagueRank: number;
1381
- leaguePercentile: number;
1382
1376
  }
1383
1377
 
1384
1378
  interface Record$1 {
@@ -1467,7 +1461,11 @@ interface GroupResponse extends Omit<Group, 'verificationHash' | 'creatorIpHash'
1467
1461
 
1468
1462
  interface CompetitionResponse extends Omit<Competition, 'verificationHash' | 'creatorIpHash'> {
1469
1463
  metric: Metric;
1470
- metrics: Metric[];
1464
+ metrics: Array<{
1465
+ weight: number;
1466
+ metric: Metric;
1467
+ createdAt: Date;
1468
+ }>;
1471
1469
  participantCount: number;
1472
1470
  group?: GroupResponse;
1473
1471
  }
@@ -1500,6 +1498,11 @@ type PlayerResponse = Omit<Player, 'latestSnapshotDate'>;
1500
1498
  interface CompetitionDetailsResponse extends CompetitionResponse {
1501
1499
  participations: Array<ParticipationResponse & {
1502
1500
  player: PlayerResponse;
1501
+ deltas: Array<{
1502
+ metric: Metric | 'total';
1503
+ values: MetricDelta;
1504
+ levels: MetricDelta;
1505
+ }>;
1503
1506
  progress: MetricDelta;
1504
1507
  levels: MetricDelta;
1505
1508
  }>;
@@ -3142,12 +3145,6 @@ declare const MetricProps: {
3142
3145
  type: MetricType;
3143
3146
  measure: MetricMeasure;
3144
3147
  };
3145
- readonly league_points: {
3146
- name: string;
3147
- minimumValue: number;
3148
- type: MetricType;
3149
- measure: MetricMeasure;
3150
- };
3151
3148
  readonly bounty_hunter_hunter: {
3152
3149
  name: string;
3153
3150
  minimumValue: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise-old-man/utils",
3
- "version": "4.0.14-league",
3
+ "version": "4.0.15",
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",