@wise-old-man/utils 3.1.17 → 3.2.0

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var dayjs = require('dayjs');
4
- var customParseFormatPlugin = require('dayjs/plugin/customParseFormat');
4
+ var customParseFormatPlugin = require('dayjs/plugin/customParseFormat.js');
5
5
 
6
6
  var config = {
7
7
  defaultUserAgent: `WiseOldMan JS Client v${process.env.npm_package_version}`,
package/dist/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import dayjs from 'dayjs';
2
- import customParseFormatPlugin from 'dayjs/plugin/customParseFormat';
2
+ import customParseFormatPlugin from 'dayjs/plugin/customParseFormat.js';
3
3
 
4
4
  var config = {
5
5
  defaultUserAgent: `WiseOldMan JS Client v${process.env.npm_package_version}`,
package/dist/es/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import dayjs from 'dayjs';
2
- import customParseFormatPlugin from 'dayjs/plugin/customParseFormat';
2
+ import customParseFormatPlugin from 'dayjs/plugin/customParseFormat.js';
3
3
 
4
4
  var config = {
5
5
  defaultUserAgent: `WiseOldMan JS Client v${process.env.npm_package_version}`,
package/dist/index.d.ts CHANGED
@@ -15,7 +15,8 @@ export type MemberActivity = {
15
15
  groupId: number;
16
16
  playerId: number;
17
17
  type: ActivityType;
18
- role?: GroupRole;
18
+ role: GroupRole | null;
19
+ previousRole: GroupRole | null;
19
20
  createdAt: Date;
20
21
  };
21
22
 
@@ -393,7 +394,7 @@ declare const Skill: {
393
394
  readonly HUNTER: "hunter";
394
395
  readonly CONSTRUCTION: "construction";
395
396
  };
396
- type Skill = typeof Skill[keyof typeof Skill];
397
+ type Skill = (typeof Skill)[keyof typeof Skill];
397
398
  declare const Activity: {
398
399
  readonly LEAGUE_POINTS: "league_points";
399
400
  readonly BOUNTY_HUNTER_HUNTER: "bounty_hunter_hunter";
@@ -410,7 +411,7 @@ declare const Activity: {
410
411
  readonly SOUL_WARS_ZEAL: "soul_wars_zeal";
411
412
  readonly GUARDIANS_OF_THE_RIFT: "guardians_of_the_rift";
412
413
  };
413
- type Activity = typeof Activity[keyof typeof Activity];
414
+ type Activity = (typeof Activity)[keyof typeof Activity];
414
415
  declare const Boss: {
415
416
  readonly ABYSSAL_SIRE: "abyssal_sire";
416
417
  readonly ALCHEMICAL_HYDRA: "alchemical_hydra";
@@ -472,12 +473,12 @@ declare const Boss: {
472
473
  readonly ZALCANO: "zalcano";
473
474
  readonly ZULRAH: "zulrah";
474
475
  };
475
- type Boss = typeof Boss[keyof typeof Boss];
476
+ type Boss = (typeof Boss)[keyof typeof Boss];
476
477
  declare const ComputedMetric: {
477
478
  readonly EHP: "ehp";
478
479
  readonly EHB: "ehb";
479
480
  };
480
- type ComputedMetric = typeof ComputedMetric[keyof typeof ComputedMetric];
481
+ type ComputedMetric = (typeof ComputedMetric)[keyof typeof ComputedMetric];
481
482
  declare const Metric: {
482
483
  readonly EHP: "ehp";
483
484
  readonly EHB: "ehb";
@@ -579,13 +580,13 @@ declare const Metric: {
579
580
  readonly HUNTER: "hunter";
580
581
  readonly CONSTRUCTION: "construction";
581
582
  };
582
- type Metric = typeof Metric[keyof typeof Metric];
583
+ type Metric = (typeof Metric)[keyof typeof Metric];
583
584
  declare const NameChangeStatus: {
584
585
  readonly PENDING: "pending";
585
586
  readonly DENIED: "denied";
586
587
  readonly APPROVED: "approved";
587
588
  };
588
- type NameChangeStatus = typeof NameChangeStatus[keyof typeof NameChangeStatus];
589
+ type NameChangeStatus = (typeof NameChangeStatus)[keyof typeof NameChangeStatus];
589
590
  declare const Period: {
590
591
  readonly FIVE_MIN: "five_min";
591
592
  readonly DAY: "day";
@@ -593,7 +594,7 @@ declare const Period: {
593
594
  readonly MONTH: "month";
594
595
  readonly YEAR: "year";
595
596
  };
596
- type Period = typeof Period[keyof typeof Period];
597
+ type Period = (typeof Period)[keyof typeof Period];
597
598
  declare const PlayerType: {
598
599
  readonly UNKNOWN: "unknown";
599
600
  readonly REGULAR: "regular";
@@ -601,7 +602,7 @@ declare const PlayerType: {
601
602
  readonly HARDCORE: "hardcore";
602
603
  readonly ULTIMATE: "ultimate";
603
604
  };
604
- type PlayerType = typeof PlayerType[keyof typeof PlayerType];
605
+ type PlayerType = (typeof PlayerType)[keyof typeof PlayerType];
605
606
  declare const PlayerBuild: {
606
607
  readonly MAIN: "main";
607
608
  readonly F2P: "f2p";
@@ -611,7 +612,7 @@ declare const PlayerBuild: {
611
612
  readonly DEF1: "def1";
612
613
  readonly HP10: "hp10";
613
614
  };
614
- type PlayerBuild = typeof PlayerBuild[keyof typeof PlayerBuild];
615
+ type PlayerBuild = (typeof PlayerBuild)[keyof typeof PlayerBuild];
615
616
  declare const PlayerStatus: {
616
617
  readonly ACTIVE: "active";
617
618
  readonly UNRANKED: "unranked";
@@ -619,12 +620,12 @@ declare const PlayerStatus: {
619
620
  readonly ARCHIVED: "archived";
620
621
  readonly BANNED: "banned";
621
622
  };
622
- type PlayerStatus = typeof PlayerStatus[keyof typeof PlayerStatus];
623
+ type PlayerStatus = (typeof PlayerStatus)[keyof typeof PlayerStatus];
623
624
  declare const CompetitionType: {
624
625
  readonly CLASSIC: "classic";
625
626
  readonly TEAM: "team";
626
627
  };
627
- type CompetitionType = typeof CompetitionType[keyof typeof CompetitionType];
628
+ type CompetitionType = (typeof CompetitionType)[keyof typeof CompetitionType];
628
629
  declare const GroupRole: {
629
630
  readonly ACHIEVER: "achiever";
630
631
  readonly ADAMANT: "adamant";
@@ -896,7 +897,7 @@ declare const GroupRole: {
896
897
  readonly ZEALOT: "zealot";
897
898
  readonly ZENYTE: "zenyte";
898
899
  };
899
- type GroupRole = typeof GroupRole[keyof typeof GroupRole];
900
+ type GroupRole = (typeof GroupRole)[keyof typeof GroupRole];
900
901
  declare const Country: {
901
902
  readonly AD: "AD";
902
903
  readonly AE: "AE";
@@ -1148,13 +1149,13 @@ declare const Country: {
1148
1149
  readonly ZM: "ZM";
1149
1150
  readonly ZW: "ZW";
1150
1151
  };
1151
- type Country = typeof Country[keyof typeof Country];
1152
+ type Country = (typeof Country)[keyof typeof Country];
1152
1153
  declare const ActivityType: {
1153
1154
  readonly JOINED: "joined";
1154
1155
  readonly LEFT: "left";
1155
1156
  readonly CHANGED_ROLE: "changed_role";
1156
1157
  };
1157
- type ActivityType = typeof ActivityType[keyof typeof ActivityType];
1158
+ type ActivityType = (typeof ActivityType)[keyof typeof ActivityType];
1158
1159
 
1159
1160
  type Achievement = Omit<Prisma_Base_Achievement, 'threshold' | 'accuracy'> & {
1160
1161
  threshold: number;
@@ -1373,11 +1374,9 @@ interface TempleGroupData {
1373
1374
  members: string[];
1374
1375
  leaders: string[];
1375
1376
  }
1376
- type MemberRoleChangeEvent = Omit<MemberActivity, 'createdAt'> & {
1377
- previousRole: GroupRole;
1378
- };
1379
- type MemberJoinedEvent = Omit<MemberActivity, 'createdAt'>;
1380
- type MemberLeftEvent = Omit<MemberActivity, 'createdAt' | 'role'>;
1377
+ type MemberRoleChangeEvent = Omit<MemberActivity, 'createdAt'>;
1378
+ type MemberJoinedEvent = Omit<MemberActivity, 'createdAt' | 'previousRole'>;
1379
+ type MemberLeftEvent = Omit<MemberActivity, 'createdAt' | 'previousRole'>;
1381
1380
  type MemberActivityWithPlayer = MemberActivity & {
1382
1381
  player: Player;
1383
1382
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise-old-man/utils",
3
- "version": "3.1.17",
3
+ "version": "3.2.0",
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",