warframe-worldstate-parser 5.2.16 → 5.2.17

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.
Files changed (181) hide show
  1. package/dist/lib/WorldState.d.mts +35 -19
  2. package/dist/lib/WorldState.mjs +31 -45
  3. package/dist/lib/models/Alert.d.mts +45 -17
  4. package/dist/lib/models/Alert.mjs +49 -5
  5. package/dist/lib/models/Archimedea.d.mts +86 -17
  6. package/dist/lib/models/Archimedea.mjs +88 -2
  7. package/dist/lib/models/Calendar.d.mts +77 -2
  8. package/dist/lib/models/Calendar.mjs +79 -2
  9. package/dist/lib/models/CambionCycle.d.mts +21 -3
  10. package/dist/lib/models/CambionCycle.mjs +28 -2
  11. package/dist/lib/models/CetusCycle.d.mts +48 -2
  12. package/dist/lib/models/CetusCycle.mjs +87 -2
  13. package/dist/lib/models/ChallengeInstance.d.mts +53 -17
  14. package/dist/lib/models/ChallengeInstance.mjs +46 -1
  15. package/dist/lib/models/ConclaveChallenge.d.mts +76 -17
  16. package/dist/lib/models/ConclaveChallenge.mjs +77 -2
  17. package/dist/lib/models/ConstructionProgress.d.mts +17 -2
  18. package/dist/lib/models/ConstructionProgress.mjs +23 -2
  19. package/dist/lib/models/DailyDeal.d.mts +66 -17
  20. package/dist/lib/models/DailyDeal.mjs +64 -2
  21. package/dist/lib/models/DarkSector.d.mts +142 -17
  22. package/dist/lib/models/DarkSector.mjs +136 -6
  23. package/dist/lib/models/DarkSectorBattle.d.mts +52 -2
  24. package/dist/lib/models/DarkSectorBattle.mjs +49 -1
  25. package/dist/lib/models/DuviriCycle.d.mts +23 -17
  26. package/dist/lib/models/DuviriCycle.mjs +55 -2
  27. package/dist/lib/models/EarthCycle.d.mts +59 -2
  28. package/dist/lib/models/EarthCycle.mjs +73 -2
  29. package/dist/lib/models/Fissure.d.mts +78 -17
  30. package/dist/lib/models/Fissure.mjs +83 -2
  31. package/dist/lib/models/FlashSale.d.mts +71 -17
  32. package/dist/lib/models/FlashSale.mjs +73 -2
  33. package/dist/lib/models/GlobalUpgrade.d.mts +55 -17
  34. package/dist/lib/models/GlobalUpgrade.mjs +56 -2
  35. package/dist/lib/models/Invasion.d.mts +113 -17
  36. package/dist/lib/models/Invasion.mjs +106 -4
  37. package/dist/lib/models/Kinepage.d.mts +21 -1
  38. package/dist/lib/models/Kinepage.mjs +22 -1
  39. package/dist/lib/models/Kuva.d.mts +20 -17
  40. package/dist/lib/models/Kuva.mjs +85 -1
  41. package/dist/lib/models/MidrathCycle.d.mts +24 -2
  42. package/dist/lib/models/MidrathCycle.mjs +66 -2
  43. package/dist/lib/models/Mission.d.mts +138 -17
  44. package/dist/lib/models/Mission.mjs +138 -3
  45. package/dist/lib/models/News.d.mts +100 -2
  46. package/dist/lib/models/News.mjs +116 -2
  47. package/dist/lib/models/Nightwave.d.mts +58 -3
  48. package/dist/lib/models/Nightwave.mjs +58 -3
  49. package/dist/lib/models/NightwaveChallenge.d.mts +50 -2
  50. package/dist/lib/models/NightwaveChallenge.mjs +51 -2
  51. package/dist/lib/models/PersistentEnemy.d.mts +78 -2
  52. package/dist/lib/models/PersistentEnemy.mjs +74 -2
  53. package/dist/lib/models/Reward.d.mts +67 -17
  54. package/dist/lib/models/Reward.mjs +71 -2
  55. package/dist/lib/models/SentientOutpost.d.mts +46 -17
  56. package/dist/lib/models/SentientOutpost.mjs +63 -1
  57. package/dist/lib/models/Simaris.d.mts +36 -17
  58. package/dist/lib/models/Simaris.mjs +33 -1
  59. package/dist/lib/models/Sortie.d.mts +60 -17
  60. package/dist/lib/models/Sortie.mjs +71 -6
  61. package/dist/lib/models/SortieVariant.d.mts +49 -17
  62. package/dist/lib/models/SortieVariant.mjs +49 -1
  63. package/dist/lib/models/SteelPathOffering.d.mts +36 -1
  64. package/dist/lib/models/SteelPathOffering.mjs +81 -1
  65. package/dist/lib/models/SyndicateJob.d.mts +92 -17
  66. package/dist/lib/models/SyndicateJob.mjs +161 -5
  67. package/dist/lib/models/SyndicateMission.d.mts +58 -17
  68. package/dist/lib/models/SyndicateMission.mjs +64 -6
  69. package/dist/lib/models/Tmp.d.mts +34 -17
  70. package/dist/lib/models/Tmp.mjs +28 -2
  71. package/dist/lib/models/VallisCycle.d.mts +29 -2
  72. package/dist/lib/models/VallisCycle.mjs +72 -2
  73. package/dist/lib/models/VoidTrader.d.mts +76 -17
  74. package/dist/lib/models/VoidTrader.mjs +76 -4
  75. package/dist/lib/models/VoidTraderItem.d.mts +43 -17
  76. package/dist/lib/models/VoidTraderItem.mjs +36 -1
  77. package/dist/lib/models/VoidTraderSchedule.d.mts +16 -17
  78. package/dist/lib/models/VoidTraderSchedule.mjs +12 -1
  79. package/dist/lib/models/WeeklyChallenge.d.mts +19 -17
  80. package/dist/lib/models/WeeklyChallenge.mjs +19 -3
  81. package/dist/lib/models/WorldEvent.d.mts +204 -17
  82. package/dist/lib/models/WorldEvent.mjs +211 -7
  83. package/dist/lib/models/WorldStateObject.d.mts +47 -1
  84. package/dist/lib/models/WorldStateObject.mjs +52 -1
  85. package/dist/lib/models/ZarimanCycle.d.mts +44 -2
  86. package/dist/lib/models/ZarimanCycle.mjs +77 -2
  87. package/dist/lib/models/index.d.mts +42 -18
  88. package/dist/lib/models/index.mjs +42 -45
  89. package/dist/lib/supporting/Dependency.d.mts +40 -1
  90. package/dist/lib/supporting/DuviriChoice.d.mts +18 -17
  91. package/dist/lib/supporting/DuviriChoice.mjs +23 -1
  92. package/dist/lib/supporting/ExternalMission.d.mts +48 -1
  93. package/dist/lib/supporting/FetchProxy.d.mts +9 -1
  94. package/dist/lib/supporting/FetchProxy.mjs +44 -1
  95. package/dist/lib/supporting/ImgCdn.d.mts +5 -1
  96. package/dist/lib/supporting/ImgCdn.mjs +5 -1
  97. package/dist/lib/supporting/KuvaLogEntry.d.mts +20 -1
  98. package/dist/lib/supporting/RewardData.d.mts +10 -1
  99. package/dist/lib/supporting/RewardData.mjs +74 -1
  100. package/dist/lib/supporting/RewardTypes.d.mts +33 -1
  101. package/dist/lib/supporting/RewardTypes.mjs +326 -1
  102. package/dist/lib/supporting/index.d.mts +8 -23
  103. package/dist/lib/supporting/index.mjs +5 -6
  104. package/dist/main.d.mts +52 -24
  105. package/dist/main.mjs +47 -48
  106. package/package.json +1 -1
  107. package/dist/Alert-CPT2sBmd.mjs +0 -51
  108. package/dist/Archimedea-Vo36QE99.mjs +0 -90
  109. package/dist/Calendar-CRM0XhAy.d.mts +0 -78
  110. package/dist/Calendar-_gEQ9BEd.mjs +0 -81
  111. package/dist/CambionCycle-B1pqIgks.mjs +0 -30
  112. package/dist/CambionCycle-OI3v1knd.d.mts +0 -22
  113. package/dist/CetusCycle-Ct51M2pd.mjs +0 -89
  114. package/dist/CetusCycle-DQ4n05vO.d.mts +0 -49
  115. package/dist/ChallengeInstance-BOu_e7ML.mjs +0 -48
  116. package/dist/ConclaveChallenge-BTN6UyV6.mjs +0 -79
  117. package/dist/ConstructionProgress-BoF2P9fx.mjs +0 -25
  118. package/dist/ConstructionProgress-DG2KzS0X.d.mts +0 -18
  119. package/dist/DailyDeal-aoNeCFWT.mjs +0 -66
  120. package/dist/DarkSector-D0uJWCg7.mjs +0 -138
  121. package/dist/DarkSectorBattle-CiSe3kFm.d.mts +0 -53
  122. package/dist/DarkSectorBattle-CqRYeNpe.mjs +0 -51
  123. package/dist/Dependency-BR-dAeHI.mjs +0 -1
  124. package/dist/Dependency-CNqXngHD.d.mts +0 -41
  125. package/dist/DuviriChoice-BEBiWA-g.mjs +0 -25
  126. package/dist/DuviriCycle-Do7mMnoC.mjs +0 -57
  127. package/dist/EarthCycle-BOAlcAuQ.mjs +0 -75
  128. package/dist/EarthCycle-CxtijnVV.d.mts +0 -60
  129. package/dist/ExternalMission-C82w4uMq.d.mts +0 -49
  130. package/dist/ExternalMission-D3MSZgnN.mjs +0 -1
  131. package/dist/FetchProxy-Bkdk15SX.mjs +0 -46
  132. package/dist/FetchProxy-DfSTUgkf.d.mts +0 -10
  133. package/dist/Fissure-diM4hyi3.mjs +0 -85
  134. package/dist/FlashSale-CNfRaZhM.mjs +0 -75
  135. package/dist/GlobalUpgrade-CUtZw05z.mjs +0 -58
  136. package/dist/ImgCdn-BJOdWAbU.mjs +0 -7
  137. package/dist/ImgCdn-D0hSGSB1.d.mts +0 -6
  138. package/dist/Invasion-Corx1lxf.mjs +0 -108
  139. package/dist/Kinepage-B-Ym_VW5.d.mts +0 -22
  140. package/dist/Kinepage-CbSzge67.mjs +0 -24
  141. package/dist/Kuva-Ijy2ZGBL.mjs +0 -87
  142. package/dist/KuvaLogEntry-D_VzIT3W.mjs +0 -1
  143. package/dist/KuvaLogEntry-cftxhjfU.d.mts +0 -21
  144. package/dist/MidrathCycle-E0gMF3AR.d.mts +0 -25
  145. package/dist/MidrathCycle-XD2T8Dx5.mjs +0 -68
  146. package/dist/Mission-b8KP-YDf.mjs +0 -140
  147. package/dist/News-DxEm-q6V.d.mts +0 -101
  148. package/dist/News-zAK-sYRg.mjs +0 -118
  149. package/dist/Nightwave-CPqMSqGK.d.mts +0 -59
  150. package/dist/Nightwave-cTRmlbwH.mjs +0 -60
  151. package/dist/NightwaveChallenge-C8ARG7LC.mjs +0 -53
  152. package/dist/NightwaveChallenge-CG3uychc.d.mts +0 -51
  153. package/dist/PersistentEnemy-3Sw5E8AN.mjs +0 -76
  154. package/dist/PersistentEnemy-DnnnreSz.d.mts +0 -79
  155. package/dist/Reward-3FBJF_hS.mjs +0 -73
  156. package/dist/RewardData-C_9b8Yhi.mjs +0 -76
  157. package/dist/RewardData-DWCgJ3UT.d.mts +0 -11
  158. package/dist/RewardTypes-DUrR7H3G.mjs +0 -328
  159. package/dist/RewardTypes-Y3tHrtIJ.d.mts +0 -34
  160. package/dist/SentientOutpost-Cadk-pIW.mjs +0 -65
  161. package/dist/Simaris-D6etEQp_.mjs +0 -35
  162. package/dist/Sortie-rSBgJc6U.mjs +0 -73
  163. package/dist/SortieVariant-CnuLkkNZ.mjs +0 -51
  164. package/dist/SteelPathOffering--wm-7hwb.mjs +0 -83
  165. package/dist/SteelPathOffering-CQkoKi5T.d.mts +0 -37
  166. package/dist/SyndicateJob-R89tWqvT.mjs +0 -162
  167. package/dist/SyndicateMission-CKZDWNyf.mjs +0 -66
  168. package/dist/Tmp-BYL_mYIG.mjs +0 -30
  169. package/dist/VallisCycle-6DCaWFoR.d.mts +0 -30
  170. package/dist/VallisCycle-BW2g49wB.mjs +0 -74
  171. package/dist/VoidTrader-DtjtVUgR.mjs +0 -78
  172. package/dist/VoidTraderItem-Cz6x1KTF.mjs +0 -38
  173. package/dist/VoidTraderSchedule-BsJLu50V.mjs +0 -14
  174. package/dist/WeeklyChallenge-Dl2ekl6X.mjs +0 -21
  175. package/dist/WorldEvent-C-LaV2ug.mjs +0 -213
  176. package/dist/WorldStateObject-45dbRgp7.mjs +0 -54
  177. package/dist/WorldStateObject-C1HEDkH7.d.mts +0 -48
  178. package/dist/ZarimanCycle-BrSLIWhD.d.mts +0 -45
  179. package/dist/ZarimanCycle-DoAPwgaM.mjs +0 -79
  180. package/dist/index-Bgx8kIDy.d.mts +0 -1671
  181. package/dist/supporting-BLSXhlWM.mjs +0 -1
@@ -1,4 +1,74 @@
1
- import "../../WorldStateObject-45dbRgp7.mjs";
2
- import { t as VallisCycle } from "../../VallisCycle-BW2g49wB.mjs";
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { fromNow, timeDeltaToString } from "warframe-worldstate-data/utilities";
3
3
 
4
+ //#region lib/models/VallisCycle.ts
5
+ const lStart = /* @__PURE__ */ new Date("2026-02-04T19:46:48Z");
6
+ const loopTime = 16e5;
7
+ const coldTime = loopTime - 4e5;
8
+ /**
9
+ * Get the current cycle state for Orb Vallis
10
+ * @returns current cycle state
11
+ */
12
+ function getCurrentCycle() {
13
+ const toNextFull = loopTime - (Date.now() - lStart.getTime()) % loopTime;
14
+ let state = "cold";
15
+ if (toNextFull > coldTime) state = "warm";
16
+ let toNextMinor;
17
+ if (toNextFull < coldTime) toNextMinor = toNextFull;
18
+ else toNextMinor = toNextFull - coldTime;
19
+ const milliAtNext = Date.now() + toNextMinor;
20
+ const milliAtPrev = Date.now() + toNextFull - (state === "warm" ? loopTime : coldTime);
21
+ const timeAtPrevious = new Date(milliAtPrev);
22
+ timeAtPrevious.setSeconds(0);
23
+ return {
24
+ state,
25
+ toNextMinor,
26
+ toNextFull,
27
+ timeAtNext: new Date(milliAtNext),
28
+ timeAtPrevious
29
+ };
30
+ }
31
+ /**
32
+ * Represents the current Earth Day/Night Cycle
33
+ * @augments {WorldStateObject}
34
+ */
35
+ var VallisCycle = class extends WorldStateObject {
36
+ /**
37
+ * Whether or not this it's daytime
38
+ */
39
+ isWarm;
40
+ /**
41
+ * Current cycle state. One of `warm`, `cold`
42
+ */
43
+ state;
44
+ /**
45
+ * The current cetus cycle, for calculating the other fields
46
+ */
47
+ #ec = getCurrentCycle();
48
+ constructor() {
49
+ super({ _id: { $oid: "vallisCycle0" } });
50
+ this.id = `vallisCycle${this.#ec.timeAtPrevious.getTime()}`;
51
+ this.activation = this.#ec.timeAtPrevious;
52
+ this.expiry = this.#ec.timeAtNext;
53
+ this.isWarm = this.#ec.state === "warm";
54
+ this.state = this.#ec.state;
55
+ }
56
+ /**
57
+ * Whether this event has expired
58
+ */
59
+ get expired() {
60
+ return fromNow(this.expiry) < 0;
61
+ }
62
+ /**
63
+ * Time remaining string
64
+ */
65
+ get timeLeft() {
66
+ return timeDeltaToString(this.#ec.toNextMinor);
67
+ }
68
+ get shortString() {
69
+ return `${this.timeLeft.replace(/\s\d*s/gi, "")} to ${this.isWarm ? "Cold" : "Warm"}`;
70
+ }
71
+ };
72
+
73
+ //#endregion
4
74
  export { VallisCycle };
@@ -1,18 +1,77 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { c as RawVoidTrader, l as VoidTrader } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { Dependency } from "../supporting/Dependency.mjs";
2
+ import "../supporting/index.mjs";
3
+ import { BaseContentObject, WorldStateObject } from "./WorldStateObject.mjs";
4
+ import { RawVoidTraderItem, VoidTraderItem } from "./VoidTraderItem.mjs";
5
+ import { VoidTraderSchedule } from "./VoidTraderSchedule.mjs";
6
+ import { ContentTimestamp } from "warframe-worldstate-data/utilities";
7
+
8
+ //#region lib/models/VoidTrader.d.ts
9
+ interface RawVoidTrader extends BaseContentObject {
10
+ Character?: string;
11
+ Node: string;
12
+ Manifest: RawVoidTraderItem[];
13
+ InitialStartDate: ContentTimestamp;
14
+ Completed: boolean;
15
+ ScheduleInfo: {
16
+ Expiry: ContentTimestamp;
17
+ FeaturedItem: string;
18
+ }[];
19
+ }
20
+ /**
21
+ * Represents a void trader
22
+ * @augments {WorldStateObject}
23
+ */
24
+ declare class VoidTrader extends WorldStateObject {
25
+ /**
26
+ * The void trader's name
27
+ */
28
+ character: string;
29
+ /**
30
+ * The node at which the Void Trader appears
31
+ */
32
+ location: string;
33
+ /**
34
+ * The trader's inventory
35
+ */
36
+ inventory: VoidTraderItem[];
37
+ /**
38
+ * Pseudo Identifier for identifying changes in inventory
39
+ */
40
+ psId: string;
41
+ /**
42
+ * The initial start date
43
+ */
44
+ initialStart: Date;
45
+ /**
46
+ * Whether it's completed or not
47
+ */
48
+ completed: boolean;
49
+ /**
50
+ * Possible schedule
51
+ */
52
+ schedule: VoidTraderSchedule[];
53
+ /**
54
+ * @param data The trader data
55
+ * @param deps The dependencies object
56
+ * @param deps.locale Locale to use for translations
57
+ * @param deps.character The trader name
58
+ */
59
+ constructor(data: RawVoidTrader, {
60
+ locale,
61
+ character
62
+ }?: Dependency);
63
+ /**
64
+ * Whether the trader is active
65
+ */
66
+ get active(): boolean;
67
+ /**
68
+ * Time delta string from now to the start
69
+ */
70
+ get startString(): string;
71
+ /**
72
+ * Time delta string from now to the end
73
+ */
74
+ get endString(): string;
75
+ }
76
+ //#endregion
18
77
  export { RawVoidTrader, VoidTrader };
@@ -1,6 +1,78 @@
1
- import "../../WorldStateObject-45dbRgp7.mjs";
2
- import "../../VoidTraderItem-Cz6x1KTF.mjs";
3
- import "../../VoidTraderSchedule-BsJLu50V.mjs";
4
- import { t as VoidTrader } from "../../VoidTrader-DtjtVUgR.mjs";
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { VoidTraderItem } from "./VoidTraderItem.mjs";
3
+ import { VoidTraderSchedule } from "./VoidTraderSchedule.mjs";
4
+ import { fromNow, insist, node, parseDate, timeDeltaToString } from "warframe-worldstate-data/utilities";
5
5
 
6
+ //#region lib/models/VoidTrader.ts
7
+ /**
8
+ * Represents a void trader
9
+ * @augments {WorldStateObject}
10
+ */
11
+ var VoidTrader = class extends WorldStateObject {
12
+ /**
13
+ * The void trader's name
14
+ */
15
+ character;
16
+ /**
17
+ * The node at which the Void Trader appears
18
+ */
19
+ location;
20
+ /**
21
+ * The trader's inventory
22
+ */
23
+ inventory;
24
+ /**
25
+ * Pseudo Identifier for identifying changes in inventory
26
+ */
27
+ psId;
28
+ /**
29
+ * The initial start date
30
+ */
31
+ initialStart;
32
+ /**
33
+ * Whether it's completed or not
34
+ */
35
+ completed;
36
+ /**
37
+ * Possible schedule
38
+ */
39
+ schedule;
40
+ /**
41
+ * @param data The trader data
42
+ * @param deps The dependencies object
43
+ * @param deps.locale Locale to use for translations
44
+ * @param deps.character The trader name
45
+ */
46
+ constructor(data, { locale = "en", character } = { locale: "en" }) {
47
+ super(data);
48
+ insist({ ...data }, "Activation", "Expiry");
49
+ this.character = data.Character ? data.Character.replace("Baro'Ki Teel", "Baro Ki'Teer") : character ?? "";
50
+ this.location = node(data.Node, locale);
51
+ this.inventory = data.Manifest ? data.Manifest.map((i) => new VoidTraderItem(i, { locale })) : [];
52
+ this.psId = `${this.id}${this.inventory.length}`;
53
+ this.initialStart = parseDate(data.InitialStartDate);
54
+ this.completed = data.Completed;
55
+ this.schedule = data.ScheduleInfo ? data.ScheduleInfo.map((i) => new VoidTraderSchedule(i, { locale })) : [];
56
+ }
57
+ /**
58
+ * Whether the trader is active
59
+ */
60
+ get active() {
61
+ return fromNow(this.activation) < 0 && fromNow(this.expiry) > 0;
62
+ }
63
+ /**
64
+ * Time delta string from now to the start
65
+ */
66
+ get startString() {
67
+ return timeDeltaToString(fromNow(this.activation));
68
+ }
69
+ /**
70
+ * Time delta string from now to the end
71
+ */
72
+ get endString() {
73
+ return timeDeltaToString(fromNow(this.expiry));
74
+ }
75
+ };
76
+
77
+ //#endregion
6
78
  export { VoidTrader };
@@ -1,18 +1,44 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { d as RawVoidTraderItem, f as VoidTraderItem } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { Dependency } from "../supporting/Dependency.mjs";
2
+ import "../supporting/index.mjs";
3
+
4
+ //#region lib/models/VoidTraderItem.d.ts
5
+ interface RawVoidTraderItem {
6
+ ItemType: string;
7
+ PrimePrice?: number;
8
+ RegularPrice?: number;
9
+ }
10
+ /**
11
+ * A void trader inventory item
12
+ */
13
+ declare class VoidTraderItem {
14
+ uniqueName: string;
15
+ /**
16
+ * The name of the inventory item
17
+ */
18
+ item: string;
19
+ /**
20
+ * Ducat cost of the item
21
+ */
22
+ ducats: number;
23
+ /**
24
+ * Credit cost of the item
25
+ */
26
+ credits: number;
27
+ /**
28
+ * @param data The void trader item data
29
+ * @param data.ItemType Worldstate Item i18n path
30
+ * @param data.PrimePrice Ducat cost of the item
31
+ * @param data.RegularPrice Credit price of the item
32
+ * @param deps The dependencies object
33
+ * @param deps.locale Locale to use for translations
34
+ */
35
+ constructor({
36
+ ItemType,
37
+ PrimePrice,
38
+ RegularPrice
39
+ }: RawVoidTraderItem, {
40
+ locale
41
+ }?: Dependency);
42
+ }
43
+ //#endregion
18
44
  export { RawVoidTraderItem, VoidTraderItem };
@@ -1,3 +1,38 @@
1
- import { t as VoidTraderItem } from "../../VoidTraderItem-Cz6x1KTF.mjs";
1
+ import { languageString } from "warframe-worldstate-data/utilities";
2
2
 
3
+ //#region lib/models/VoidTraderItem.ts
4
+ /**
5
+ * A void trader inventory item
6
+ */
7
+ var VoidTraderItem = class {
8
+ uniqueName;
9
+ /**
10
+ * The name of the inventory item
11
+ */
12
+ item;
13
+ /**
14
+ * Ducat cost of the item
15
+ */
16
+ ducats;
17
+ /**
18
+ * Credit cost of the item
19
+ */
20
+ credits;
21
+ /**
22
+ * @param data The void trader item data
23
+ * @param data.ItemType Worldstate Item i18n path
24
+ * @param data.PrimePrice Ducat cost of the item
25
+ * @param data.RegularPrice Credit price of the item
26
+ * @param deps The dependencies object
27
+ * @param deps.locale Locale to use for translations
28
+ */
29
+ constructor({ ItemType, PrimePrice, RegularPrice }, { locale = "en" } = { locale: "en" }) {
30
+ this.uniqueName = ItemType;
31
+ this.item = languageString(ItemType, locale);
32
+ this.ducats = Number.parseInt(String(PrimePrice), 10);
33
+ this.credits = Number.parseInt(String(RegularPrice), 10);
34
+ }
35
+ };
36
+
37
+ //#endregion
3
38
  export { VoidTraderItem };
@@ -1,18 +1,17 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { u as VoidTraderSchedule } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { Dependency } from "../supporting/Dependency.mjs";
2
+ import "../supporting/index.mjs";
3
+ import { ContentTimestamp } from "warframe-worldstate-data/utilities";
4
+
5
+ //#region lib/models/VoidTraderSchedule.d.ts
6
+ declare class VoidTraderSchedule {
7
+ expiry: Date;
8
+ item: string;
9
+ constructor(data: {
10
+ Expiry: ContentTimestamp;
11
+ FeaturedItem: string;
12
+ }, {
13
+ locale
14
+ }?: Dependency);
15
+ }
16
+ //#endregion
18
17
  export { VoidTraderSchedule };
@@ -1,3 +1,14 @@
1
- import { t as VoidTraderSchedule } from "../../VoidTraderSchedule-BsJLu50V.mjs";
1
+ import { languageString, parseDate } from "warframe-worldstate-data/utilities";
2
2
 
3
+ //#region lib/models/VoidTraderSchedule.ts
4
+ var VoidTraderSchedule = class {
5
+ expiry;
6
+ item;
7
+ constructor(data, { locale = "en" } = { locale: "en" }) {
8
+ this.expiry = parseDate(data.Expiry);
9
+ this.item = languageString(data.FeaturedItem, locale);
10
+ }
11
+ };
12
+
13
+ //#endregion
3
14
  export { VoidTraderSchedule };
@@ -1,18 +1,20 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { o as RawWeeklyChallenge, s as WeeklyChallenge } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { BaseContentObject, WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { ChallengeInstance, RawChallengeInstance } from "./ChallengeInstance.mjs";
3
+
4
+ //#region lib/models/WeeklyChallenge.d.ts
5
+ interface RawWeeklyChallenge extends BaseContentObject {
6
+ Challenges: RawChallengeInstance[];
7
+ }
8
+ /**
9
+ * Represents a void trader
10
+ * @augments {WorldStateObject}
11
+ */
12
+ declare class WeeklyChallenge extends WorldStateObject {
13
+ challenges: ChallengeInstance[];
14
+ /**
15
+ * @param data The Void trader data
16
+ */
17
+ constructor(data: RawWeeklyChallenge);
18
+ }
19
+ //#endregion
18
20
  export { RawWeeklyChallenge, WeeklyChallenge };
@@ -1,5 +1,21 @@
1
- import "../../WorldStateObject-45dbRgp7.mjs";
2
- import "../../ChallengeInstance-BOu_e7ML.mjs";
3
- import { t as WeeklyChallenge } from "../../WeeklyChallenge-Dl2ekl6X.mjs";
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { ChallengeInstance } from "./ChallengeInstance.mjs";
4
3
 
4
+ //#region lib/models/WeeklyChallenge.ts
5
+ /**
6
+ * Represents a void trader
7
+ * @augments {WorldStateObject}
8
+ */
9
+ var WeeklyChallenge = class extends WorldStateObject {
10
+ challenges;
11
+ /**
12
+ * @param data The Void trader data
13
+ */
14
+ constructor(data) {
15
+ super(data);
16
+ this.challenges = data.Challenges.map((challengeData) => new ChallengeInstance(challengeData));
17
+ }
18
+ };
19
+
20
+ //#endregion
5
21
  export { WeeklyChallenge };