warframe-worldstate-parser 5.2.15 → 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-C5JCM2ia.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,18 +1,68 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { ct as getItemType, lt as getItemTypeFull, ot as RawReward, st as Reward } 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 { RewardType } from "../supporting/RewardTypes.mjs";
3
+ import "../supporting/index.mjs";
4
+
5
+ //#region lib/models/Reward.d.ts
6
+ /**
7
+ * Returns the type of a given item
8
+ */
9
+ declare function getItemType(item: string, types?: RewardType[]): string;
10
+ /**
11
+ * Returns the full type of a given item
12
+ */
13
+ declare function getItemTypeFull(item: string, types?: RewardType[]): RewardType;
14
+ interface RawReward {
15
+ items: string[];
16
+ countedItems?: {
17
+ ItemType: string;
18
+ ItemCount: number;
19
+ }[];
20
+ credits?: number;
21
+ }
22
+ /**
23
+ * Represents a mission reward
24
+ */
25
+ declare class Reward {
26
+ /**
27
+ * The items being rewarded
28
+ */
29
+ items: string[];
30
+ /**
31
+ * The counted items being rewarded
32
+ */
33
+ countedItems: {
34
+ type: string;
35
+ key: string;
36
+ count: number;
37
+ }[];
38
+ /**
39
+ * The credits being rewarded
40
+ */
41
+ credits: number;
42
+ /**
43
+ * Thumbnail url
44
+ */
45
+ thumbnail: string;
46
+ /**
47
+ * Reward color
48
+ */
49
+ color: number;
50
+ /**
51
+ * @param data The mission data
52
+ * @param deps The dependencies object
53
+ * @param deps.locale Locale to use for translations
54
+ */
55
+ constructor(data: RawReward, {
56
+ locale
57
+ }?: Dependency);
58
+ /**
59
+ * The types of all items that are being rewarded
60
+ */
61
+ getTypes(): string[];
62
+ /**
63
+ * The types of all the items that are being rewarded
64
+ */
65
+ private getTypesFull;
66
+ }
67
+ //#endregion
18
68
  export { RawReward, Reward, getItemType, getItemTypeFull };
@@ -1,4 +1,73 @@
1
- import "../../RewardTypes-DUrR7H3G.mjs";
2
- import { n as getItemType, r as getItemTypeFull, t as Reward } from "../../Reward-3FBJF_hS.mjs";
1
+ import RewardTypes_default from "../supporting/RewardTypes.mjs";
2
+ import { insist, languageString } from "warframe-worldstate-data/utilities";
3
3
 
4
+ //#region lib/models/Reward.ts
5
+ /**
6
+ * Returns the type of a given item
7
+ */
8
+ function getItemType(item, types = RewardTypes_default) {
9
+ return types.find((t) => t.test(item)).name;
10
+ }
11
+ /**
12
+ * Returns the full type of a given item
13
+ */
14
+ function getItemTypeFull(item, types = RewardTypes_default) {
15
+ return types.find((t) => t.test(item));
16
+ }
17
+ /**
18
+ * Represents a mission reward
19
+ */
20
+ var Reward = class {
21
+ /**
22
+ * The items being rewarded
23
+ */
24
+ items;
25
+ /**
26
+ * The counted items being rewarded
27
+ */
28
+ countedItems;
29
+ /**
30
+ * The credits being rewarded
31
+ */
32
+ credits;
33
+ /**
34
+ * Thumbnail url
35
+ */
36
+ thumbnail;
37
+ /**
38
+ * Reward color
39
+ */
40
+ color;
41
+ /**
42
+ * @param data The mission data
43
+ * @param deps The dependencies object
44
+ * @param deps.locale Locale to use for translations
45
+ */
46
+ constructor(data, { locale = "en" } = { locale: "en" }) {
47
+ insist({ ...data });
48
+ this.items = data.items ? data.items.map((i) => languageString(i, locale)) : [];
49
+ this.countedItems = data.countedItems ? data.countedItems.map((i) => ({
50
+ count: i.ItemCount,
51
+ type: languageString(i.ItemType, locale),
52
+ key: languageString(i.ItemType)
53
+ })) : [];
54
+ this.credits = data.credits || 0;
55
+ this.thumbnail = this.getTypesFull()[0] ? this.getTypesFull()[0].thumbnail : "https://i.imgur.com/JCKyUXJ.png";
56
+ this.color = this.getTypesFull()[0] ? this.getTypesFull()[0].color : 15844367;
57
+ }
58
+ /**
59
+ * The types of all items that are being rewarded
60
+ */
61
+ getTypes() {
62
+ return this.items.concat(this.countedItems.map((i) => i.key)).map((t) => getItemType(t));
63
+ }
64
+ /**
65
+ * The types of all the items that are being rewarded
66
+ */
67
+ getTypesFull() {
68
+ return this.items.concat(this.countedItems.map((i) => i.key)).map((t) => getItemTypeFull(t));
69
+ }
70
+ };
71
+
72
+ //#endregion
4
73
  export { Reward, getItemType, getItemTypeFull };
@@ -1,18 +1,47 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { D as SentientOutpost, E as OutpostMission } 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/SentientOutpost.d.ts
5
+ /**
6
+ * Mission typeDef
7
+ */
8
+ interface OutpostMission {
9
+ node: string;
10
+ faction: string;
11
+ type: string;
12
+ }
13
+ /**
14
+ * Represents a set of sentient outposts that are present
15
+ * Parsed source is combined data from DE's worldstate and semlar.com/anomaly.json
16
+ */
17
+ declare class SentientOutpost {
18
+ private readonly node;
19
+ id: string;
20
+ /**
21
+ * Start time
22
+ */
23
+ activation: Date;
24
+ /**
25
+ * End time
26
+ */
27
+ expiry: Date;
28
+ /**
29
+ * Current Mission
30
+ */
31
+ mission?: OutpostMission;
32
+ /**
33
+ * Whether or not the object was active during creation
34
+ */
35
+ active: boolean;
36
+ /**
37
+ * @param sfn Sentient outpost node number
38
+ * @param deps Dependencies
39
+ */
40
+ constructor(sfn: string | number | undefined, {
41
+ locale,
42
+ sentientData,
43
+ logger
44
+ }: Dependency);
45
+ }
46
+ //#endregion
18
47
  export { OutpostMission, SentientOutpost };
@@ -1,3 +1,65 @@
1
- import { t as SentientOutpost } from "../../SentientOutpost-Cadk-pIW.mjs";
1
+ import { node, nodeEnemy, nodeMissionType } from "warframe-worldstate-data/utilities";
2
2
 
3
+ //#region lib/models/SentientOutpost.ts
4
+ const duration = 1800;
5
+ const sat = () => {
6
+ const now = Math.floor(Date.now() / 1e3);
7
+ const cycleSeconds = now % duration;
8
+ const active = cycleSeconds > 0 && cycleSeconds < 1800;
9
+ const start = (now - cycleSeconds) * 1e3;
10
+ const end = (now - cycleSeconds + duration) * 1e3;
11
+ return {
12
+ active,
13
+ expiry: new Date(end),
14
+ activation: new Date(start)
15
+ };
16
+ };
17
+ /**
18
+ * Represents a set of sentient outposts that are present
19
+ * Parsed source is combined data from DE's worldstate and semlar.com/anomaly.json
20
+ */
21
+ var SentientOutpost = class {
22
+ node;
23
+ id;
24
+ /**
25
+ * Start time
26
+ */
27
+ activation;
28
+ /**
29
+ * End time
30
+ */
31
+ expiry;
32
+ /**
33
+ * Current Mission
34
+ */
35
+ mission;
36
+ /**
37
+ * Whether or not the object was active during creation
38
+ */
39
+ active;
40
+ /**
41
+ * @param sfn Sentient outpost node number
42
+ * @param deps Dependencies
43
+ */
44
+ constructor(sfn, { locale, sentientData, logger }) {
45
+ this.node = sfn || "000";
46
+ const id = `CrewBattleNode${this.node}`;
47
+ if (this.node === "000") this.mission = void 0;
48
+ else this.mission = {
49
+ node: node(id, locale),
50
+ faction: nodeEnemy(id, locale),
51
+ type: nodeMissionType(id, locale)
52
+ };
53
+ ({activation: this.activation, expiry: this.expiry} = sat());
54
+ this.active = Boolean(this.mission);
55
+ this.id = `${id}:${this.active}`;
56
+ if (!sentientData) logger?.debug("No outpost data, skipping");
57
+ else {
58
+ this.activation = /* @__PURE__ */ new Date(sentientData.start * 1e3);
59
+ this.expiry = /* @__PURE__ */ new Date(sentientData.end * 1e3);
60
+ }
61
+ }
62
+ };
63
+
64
+ //#endregion
3
65
  export { SentientOutpost };
@@ -1,18 +1,37 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { T as Simaris, w as LibraryInfo } 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/Simaris.d.ts
5
+ /**
6
+ * Simaris library info
7
+ */
8
+ type LibraryInfo = {
9
+ LastCompletedTargetType: string;
10
+ };
11
+ /**
12
+ * Contains information about sanctuary targets
13
+ */
14
+ declare class Simaris {
15
+ /**
16
+ * The sanctuary target
17
+ */
18
+ target: string;
19
+ /**
20
+ * Whether or not the target is currently active
21
+ */
22
+ isTargetActive: boolean;
23
+ /**
24
+ * @param data The sanctuary data
25
+ * @param deps The dependencies object
26
+ * @param deps.locale Locale to use for translations
27
+ */
28
+ constructor(data?: LibraryInfo, {
29
+ locale
30
+ }?: Dependency);
31
+ /**
32
+ * A string representation of the current sanctuary status
33
+ */
34
+ get asString(): string;
35
+ }
36
+ //#endregion
18
37
  export { LibraryInfo, Simaris };
@@ -1,3 +1,35 @@
1
- import { t as Simaris } from "../../Simaris-D6etEQp_.mjs";
1
+ import { languageString } from "warframe-worldstate-data/utilities";
2
2
 
3
+ //#region lib/models/Simaris.ts
4
+ /**
5
+ * Contains information about sanctuary targets
6
+ */
7
+ var Simaris = class {
8
+ /**
9
+ * The sanctuary target
10
+ */
11
+ target;
12
+ /**
13
+ * Whether or not the target is currently active
14
+ */
15
+ isTargetActive;
16
+ /**
17
+ * @param data The sanctuary data
18
+ * @param deps The dependencies object
19
+ * @param deps.locale Locale to use for translations
20
+ */
21
+ constructor(data, { locale } = { locale: "en" }) {
22
+ if (!data || !Object.keys(data).length) data = { LastCompletedTargetType: "" };
23
+ this.target = languageString(data.LastCompletedTargetType, locale) || "N/A";
24
+ this.isTargetActive = !data.LastCompletedTargetType;
25
+ }
26
+ /**
27
+ * A string representation of the current sanctuary status
28
+ */
29
+ get asString() {
30
+ return `Simaris's ${this.isTargetActive ? "current" : "previous"} objective ${this.isTargetActive ? "is" : "was"} ${this.target}`;
31
+ }
32
+ };
33
+
34
+ //#endregion
3
35
  export { Simaris };
@@ -1,18 +1,61 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { b as RawSortie, x as Sortie } 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 { Mission, RawMission } from "./Mission.mjs";
4
+ import { BaseContentObject, WorldStateObject } from "./WorldStateObject.mjs";
5
+ import { RawSortieVariant, SortieVariant } from "./SortieVariant.mjs";
6
+
7
+ //#region lib/models/Sortie.d.ts
8
+ interface RawSortie extends BaseContentObject {
9
+ Reward: string;
10
+ Variants?: RawSortieVariant[];
11
+ Missions?: RawMission[];
12
+ Boss: string;
13
+ }
14
+ /**
15
+ * Represents a daily sortie
16
+ * @augments {WorldStateObject}
17
+ */
18
+ declare class Sortie extends WorldStateObject {
19
+ /**
20
+ * The sortie's reward pool
21
+ */
22
+ rewardPool: string;
23
+ /**
24
+ * The sortie's variants
25
+ */
26
+ variants: SortieVariant[];
27
+ /**
28
+ * Archon hunt missions if sortie is an archon hunt
29
+ */
30
+ missions: Mission[];
31
+ /**
32
+ * The sortie's boss
33
+ */
34
+ boss: string;
35
+ /**
36
+ * The sortie's faction
37
+ */
38
+ faction: string;
39
+ /**
40
+ * The sortie's faction
41
+ */
42
+ factionKey: string;
43
+ /**
44
+ * @param data The data for all daily sorties
45
+ * @param deps The dependencies object
46
+ * @param deps.locale Locale to use for translations
47
+ */
48
+ constructor(data: RawSortie, {
49
+ locale
50
+ }?: Dependency);
51
+ /**
52
+ * ETA string (at time of object creation)
53
+ */
54
+ get eta(): string;
55
+ /**
56
+ * Whether this is expired (at time of object creation)
57
+ */
58
+ get expired(): boolean;
59
+ }
60
+ //#endregion
18
61
  export { RawSortie, Sortie };
@@ -1,8 +1,73 @@
1
- import "../../RewardTypes-DUrR7H3G.mjs";
2
- import "../../Reward-3FBJF_hS.mjs";
3
- import "../../Mission-b8KP-YDf.mjs";
4
- import "../../WorldStateObject-45dbRgp7.mjs";
5
- import "../../SortieVariant-CnuLkkNZ.mjs";
6
- import { t as Sortie } from "../../Sortie-rSBgJc6U.mjs";
1
+ import { Mission } from "./Mission.mjs";
2
+ import { WorldStateObject } from "./WorldStateObject.mjs";
3
+ import { SortieVariant } from "./SortieVariant.mjs";
4
+ import wsData from "warframe-worldstate-data";
5
+ import { fromNow, languageString, parseDate, sortieBoss, sortieFaction, timeDeltaToString } from "warframe-worldstate-data/utilities";
7
6
 
7
+ //#region lib/models/Sortie.ts
8
+ const { sortie: sortieData } = wsData;
9
+ /**
10
+ * Represents a daily sortie
11
+ * @augments {WorldStateObject}
12
+ */
13
+ var Sortie = class extends WorldStateObject {
14
+ /**
15
+ * The sortie's reward pool
16
+ */
17
+ rewardPool;
18
+ /**
19
+ * The sortie's variants
20
+ */
21
+ variants;
22
+ /**
23
+ * Archon hunt missions if sortie is an archon hunt
24
+ */
25
+ missions;
26
+ /**
27
+ * The sortie's boss
28
+ */
29
+ boss;
30
+ /**
31
+ * The sortie's faction
32
+ */
33
+ faction;
34
+ /**
35
+ * The sortie's faction
36
+ */
37
+ factionKey;
38
+ /**
39
+ * @param data The data for all daily sorties
40
+ * @param deps The dependencies object
41
+ * @param deps.locale Locale to use for translations
42
+ */
43
+ constructor(data, { locale = "en" } = { locale: "en" }) {
44
+ super(data);
45
+ const opts = {
46
+ sortieData,
47
+ locale
48
+ };
49
+ this.activation = parseDate(data.Activation);
50
+ this.expiry = parseDate(data.Expiry);
51
+ this.rewardPool = languageString(data.Reward, locale);
52
+ this.variants = (data.Variants ?? []).map((v) => new SortieVariant(v, opts));
53
+ this.missions = (data.Missions ?? []).map((v) => new Mission(v, opts));
54
+ this.boss = sortieBoss(data.Boss, locale);
55
+ this.faction = sortieFaction(data.Boss, locale);
56
+ this.factionKey = sortieFaction(data.Boss, "en");
57
+ }
58
+ /**
59
+ * ETA string (at time of object creation)
60
+ */
61
+ get eta() {
62
+ return timeDeltaToString(fromNow(this.expiry));
63
+ }
64
+ /**
65
+ * Whether this is expired (at time of object creation)
66
+ */
67
+ get expired() {
68
+ return fromNow(this.expiry) < 0;
69
+ }
70
+ };
71
+
72
+ //#endregion
8
73
  export { Sortie };
@@ -1,18 +1,50 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { C as SortieVariant, S as RawSortieVariant } 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/SortieVariant.d.ts
5
+ interface RawSortieVariant {
6
+ missionType: string;
7
+ modifierType: string;
8
+ node: string;
9
+ }
10
+ /**
11
+ * Represents a sortie variant
12
+ * @class
13
+ */
14
+ declare class SortieVariant {
15
+ /**
16
+ * The variant's mission type
17
+ */
18
+ missionType: string;
19
+ /**
20
+ * The variant's mission type unlocalized
21
+ */
22
+ missionTypeKey: string;
23
+ /**
24
+ * The mission modifier
25
+ */
26
+ modifier: string;
27
+ /**
28
+ * The variant's modifier description
29
+ */
30
+ modifierDescription: string;
31
+ /**
32
+ * The node where the variant takes place
33
+ */
34
+ node: string;
35
+ /**
36
+ * The node where the variant takes place unlocalized
37
+ */
38
+ nodeKey: string;
39
+ /**
40
+ * Make the SortieVariant
41
+ * @param data Sortie variant data
42
+ * @param deps Dependencies
43
+ * @param deps.locale Locale to use for translations
44
+ */
45
+ constructor(data: RawSortieVariant, {
46
+ locale
47
+ }?: Dependency);
48
+ }
49
+ //#endregion
18
50
  export { RawSortieVariant, SortieVariant };
@@ -1,3 +1,51 @@
1
- import { t as SortieVariant } from "../../SortieVariant-CnuLkkNZ.mjs";
1
+ import { insist, missionType, node, sortieModDesc, sortieModifier } from "warframe-worldstate-data/utilities";
2
2
 
3
+ //#region lib/models/SortieVariant.ts
4
+ /**
5
+ * Represents a sortie variant
6
+ * @class
7
+ */
8
+ var SortieVariant = class {
9
+ /**
10
+ * The variant's mission type
11
+ */
12
+ missionType;
13
+ /**
14
+ * The variant's mission type unlocalized
15
+ */
16
+ missionTypeKey;
17
+ /**
18
+ * The mission modifier
19
+ */
20
+ modifier;
21
+ /**
22
+ * The variant's modifier description
23
+ */
24
+ modifierDescription;
25
+ /**
26
+ * The node where the variant takes place
27
+ */
28
+ node;
29
+ /**
30
+ * The node where the variant takes place unlocalized
31
+ */
32
+ nodeKey;
33
+ /**
34
+ * Make the SortieVariant
35
+ * @param data Sortie variant data
36
+ * @param deps Dependencies
37
+ * @param deps.locale Locale to use for translations
38
+ */
39
+ constructor(data, { locale = "en" } = { locale: "en" }) {
40
+ insist({ ...data });
41
+ this.missionType = missionType(data.missionType, locale);
42
+ this.missionTypeKey = missionType(data.missionType, "en");
43
+ this.modifier = sortieModifier(data.modifierType, locale);
44
+ this.modifierDescription = sortieModDesc(data.modifierType, locale);
45
+ this.node = node(data.node, locale);
46
+ this.nodeKey = node(data.node, "en");
47
+ }
48
+ };
49
+
50
+ //#endregion
3
51
  export { SortieVariant };