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,2 +1,37 @@
1
- import { n as SteelPathOfferings, t as Incursion } from "../../SteelPathOffering-CQkoKi5T.mjs";
1
+ import { Locale } from "warframe-worldstate-data";
2
+ import { SteelPathOffering } from "warframe-worldstate-data/types";
3
+
4
+ //#region lib/models/SteelPathOffering.d.ts
5
+ /**
6
+ * General data pertaining to incursions
7
+ */
8
+ interface Incursion {
9
+ /**
10
+ * Identifier for steel path incursion based on start of day.
11
+ */
12
+ id: string;
13
+ /**
14
+ * when the current incursions became active
15
+ */
16
+ activation: Date;
17
+ /**
18
+ * when the current incursions become inactive
19
+ */
20
+ expiry: Date;
21
+ }
22
+ declare class SteelPathOfferings {
23
+ currentReward: SteelPathOffering;
24
+ activation: Date;
25
+ expiry: Date;
26
+ remaining: string;
27
+ rotation: SteelPathOffering[];
28
+ evergreens: SteelPathOffering[];
29
+ incursions: Incursion;
30
+ constructor({
31
+ locale
32
+ }: {
33
+ locale: Locale;
34
+ });
35
+ }
36
+ //#endregion
2
37
  export { Incursion, SteelPathOfferings };
@@ -1,3 +1,83 @@
1
- import { t as SteelPathOfferings } from "../../SteelPathOffering--wm-7hwb.mjs";
1
+ import { steelPath, timeDeltaToString } from "warframe-worldstate-data/utilities";
2
2
 
3
+ //#region lib/models/SteelPathOffering.ts
4
+ const monday = 1;
5
+ /**
6
+ * Gets the first day of the week
7
+ */
8
+ function getFirstDayOfWeek() {
9
+ const resultDate = /* @__PURE__ */ new Date();
10
+ /* istanbul ignore next */
11
+ const offset = resultDate.getUTCDay() === 0 ? 6 : resultDate.getUTCDay() - monday;
12
+ resultDate.setUTCDate(resultDate.getUTCDate() - offset);
13
+ resultDate.setUTCHours(0);
14
+ resultDate.setUTCMinutes(0);
15
+ resultDate.setUTCSeconds(0);
16
+ resultDate.setUTCMilliseconds(0);
17
+ return resultDate;
18
+ }
19
+ /**
20
+ * Get the last day of the week
21
+ */
22
+ function getLastDayOfWeek() {
23
+ const last = new Date(getFirstDayOfWeek());
24
+ last.setUTCDate(last.getUTCDate() + 6);
25
+ last.setUTCHours(23);
26
+ last.setUTCMinutes(59);
27
+ last.setUTCSeconds(59);
28
+ last.setUTCMilliseconds(0);
29
+ return last;
30
+ }
31
+ /**
32
+ * When was the start of the day
33
+ */
34
+ function getStartOfDay() {
35
+ const today = /* @__PURE__ */ new Date();
36
+ today.setUTCHours(0);
37
+ today.setUTCMinutes(0);
38
+ today.setUTCSeconds(0);
39
+ today.setUTCMilliseconds(0);
40
+ return today;
41
+ }
42
+ /**
43
+ * When was the end of the day
44
+ */
45
+ function getEndOfDay() {
46
+ const last = /* @__PURE__ */ new Date();
47
+ last.setUTCHours(23);
48
+ last.setUTCMinutes(59);
49
+ last.setUTCSeconds(59);
50
+ last.setUTCMilliseconds(0);
51
+ return last;
52
+ }
53
+ /**
54
+ * Start of Steel Path cycle calculations
55
+ */
56
+ const start = /* @__PURE__ */ new Date("2020-11-16T00:00:00.000Z");
57
+ var SteelPathOfferings = class {
58
+ currentReward;
59
+ activation;
60
+ expiry;
61
+ remaining;
62
+ rotation;
63
+ evergreens;
64
+ incursions;
65
+ constructor({ locale }) {
66
+ const sSinceStart = (Date.now() - start.getTime()) / 1e3;
67
+ const ind = Math.floor(sSinceStart % 4838400 / 604800);
68
+ this.currentReward = steelPath(locale).rotation[ind];
69
+ this.activation = getFirstDayOfWeek();
70
+ this.expiry = getLastDayOfWeek();
71
+ this.remaining = timeDeltaToString(this.expiry.getTime() - Date.now());
72
+ this.rotation = steelPath(locale).rotation;
73
+ this.evergreens = steelPath(locale).evergreen;
74
+ this.incursions = {
75
+ id: `spi:${getStartOfDay().getTime()}`,
76
+ activation: getStartOfDay(),
77
+ expiry: getEndOfDay()
78
+ };
79
+ }
80
+ };
81
+
82
+ //#endregion
3
83
  export { SteelPathOfferings };
@@ -1,18 +1,93 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { _ as RawSyndicateJob, v as RewardDrop, y as SyndicateJob } 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 { Identifier, WorldStateObject } from "./WorldStateObject.mjs";
4
+
5
+ //#region lib/models/SyndicateJob.d.ts
6
+ interface BountyReward {
7
+ item: string;
8
+ rarity: string;
9
+ chance: number;
10
+ }
11
+ interface RawSyndicateJob {
12
+ rewards: string;
13
+ isVault?: boolean;
14
+ JobCurrentVersion?: Identifier;
15
+ jobType?: string;
16
+ locationTag?: string;
17
+ minEnemyLevel: number;
18
+ maxEnemyLevel: number;
19
+ xpAmounts: number[];
20
+ masteryReq?: number;
21
+ }
22
+ interface RewardDrop extends BountyReward {
23
+ count: number;
24
+ }
25
+ /**
26
+ * Represents a syndicate daily mission
27
+ * @augments {WorldStateObject}
28
+ */
29
+ declare class SyndicateJob extends WorldStateObject {
30
+ /**
31
+ * Reward pool unique name
32
+ */
33
+ uniqueName: string;
34
+ /**
35
+ * Array of strings describing rewards
36
+ */
37
+ rewardPool: string[];
38
+ /**
39
+ * A structured version of the reward pool
40
+ */
41
+ rewardPoolDrops: RewardDrop[];
42
+ /**
43
+ * The type of job this is
44
+ */
45
+ type?: string;
46
+ /**
47
+ * Array of enemy levels
48
+ */
49
+ enemyLevels: number[];
50
+ /**
51
+ * Array of standing gains per stage of job
52
+ */
53
+ standingStages: number[];
54
+ /**
55
+ * Minimum mastery required to participate
56
+ */
57
+ minMR: number;
58
+ /**
59
+ * Whether or not this is a Vault job.
60
+ * No indication for difference of normal vs arcana vaults.
61
+ */
62
+ isVault?: boolean;
63
+ /**
64
+ * Corresponding chamber. Nullable
65
+ */
66
+ locationTag?: string;
67
+ /**
68
+ * What time phase this bounty is bound to
69
+ */
70
+ timeBound: string | undefined;
71
+ /**
72
+ * Generate a job with async data (reward pool)
73
+ * @param data The syndicate mission data
74
+ * @param expiry The syndicate job expiration
75
+ * @param deps The dependencies object
76
+ * @returns The created SyndicateJob object with rewardPool
77
+ */
78
+ static build(data: RawSyndicateJob, expiry: Date, deps: Dependency): Promise<SyndicateJob>;
79
+ /**
80
+ * Construct a job without async data (reward pool)
81
+ * @param data The syndicate mission data
82
+ * @param expiry The syndicate job expiration
83
+ * @param deps The dependencies object
84
+ * @param deps.locale Locale to use for translations
85
+ *
86
+ * This DOES NOT populate the reward pool
87
+ */
88
+ constructor(data: RawSyndicateJob, expiry: Date, {
89
+ locale
90
+ }?: Dependency);
91
+ }
92
+ //#endregion
18
93
  export { RawSyndicateJob, RewardDrop, SyndicateJob };
@@ -1,7 +1,163 @@
1
- import "../../RewardTypes-DUrR7H3G.mjs";
2
- import "../../WorldStateObject-45dbRgp7.mjs";
3
- import "../../FetchProxy-Bkdk15SX.mjs";
4
- import "../../supporting-BLSXhlWM.mjs";
5
- import { t as SyndicateJob } from "../../SyndicateJob-R89tWqvT.mjs";
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { fetchProxy } from "../supporting/FetchProxy.mjs";
3
+ import "../supporting/index.mjs";
4
+ import { languageString } from "warframe-worldstate-data/utilities";
6
5
 
6
+ //#region lib/models/SyndicateJob.ts
7
+ const apiBase = process.env.API_BASE_URL || "https://api.warframestat.us";
8
+ const bountyRewardRegex = /(?:Tier([ABCDE])|Narmer)Table([ABC])Rewards/i;
9
+ const ghoulRewardRegex = /GhoulBountyTable([AB])Rewards/i;
10
+ /**
11
+ * Determine the level string for the bounty
12
+ */
13
+ const getLevelString = (job) => `${job.minEnemyLevel} - ${job.maxEnemyLevel}`;
14
+ const determineLocation = (i18n, raw, isVault) => {
15
+ const last = String(i18n).split("/").slice(-1)[0];
16
+ const bountyMatches = last.match(bountyRewardRegex);
17
+ const ghoulMatches = last.match(ghoulRewardRegex);
18
+ const isBounty = bountyMatches?.length;
19
+ const isGhoul = ghoulMatches?.length;
20
+ const isCetus = /eidolonjob/i.test(i18n);
21
+ const isVallis = /venusjob/i.test(i18n);
22
+ const isDeimos = /deimosmissionrewards/i.test(i18n);
23
+ const rotation = isBounty ? bountyMatches[2] : "";
24
+ const levelString = getLevelString(raw);
25
+ let location;
26
+ let levelClause;
27
+ if (isCetus) {
28
+ location = "Earth/Cetus ";
29
+ if (isGhoul) levelClause = `(Level ${levelString} Ghoul Bounty)`;
30
+ else levelClause = `(Level ${levelString} Cetus Bounty)`;
31
+ }
32
+ if (isVallis) {
33
+ location = "Venus/Orb Vallis ";
34
+ levelClause = `(Level ${levelString} Orb Vallis Bounty)`;
35
+ }
36
+ if (isDeimos) {
37
+ location = "Deimos/Cambion Drift ";
38
+ levelClause = `(Level ${levelString} ${isVault ? "Isolation Vault" : "Cambion Drift Bounty"})`;
39
+ }
40
+ const locationWRot = `${location}${levelClause}, Rot ${rotation.length ? rotation : "A"}`;
41
+ return {
42
+ location,
43
+ locationWRot
44
+ };
45
+ };
46
+ const getBountyRewards = async (i18n, raw, isVault) => {
47
+ let location;
48
+ let locationWRot;
49
+ if (i18n.endsWith("PlagueStarTableRewards")) {
50
+ location = "plague star";
51
+ locationWRot = "Earth/Cetus (Level 15 - 25 Plague Star), Rot A";
52
+ }
53
+ if (!location || !locationWRot) ({location, locationWRot} = determineLocation(i18n, raw, isVault));
54
+ const pool = (await fetchProxy(`${apiBase}/drops/search/${encodeURIComponent(location)}?grouped_by=location`).then((res) => res.json()).catch(() => {}))?.[locationWRot];
55
+ if (!pool) return ["Pattern Mismatch. Results inaccurate."];
56
+ const results = pool.rewards;
57
+ if (results) return Array.from(new Set(results));
58
+ return [];
59
+ };
60
+ const FIFTY_MINUTES = 3e6;
61
+ /**
62
+ * Represents a syndicate daily mission
63
+ * @augments {WorldStateObject}
64
+ */
65
+ var SyndicateJob = class SyndicateJob extends WorldStateObject {
66
+ /**
67
+ * Reward pool unique name
68
+ */
69
+ uniqueName;
70
+ /**
71
+ * Array of strings describing rewards
72
+ */
73
+ rewardPool;
74
+ /**
75
+ * A structured version of the reward pool
76
+ */
77
+ rewardPoolDrops;
78
+ /**
79
+ * The type of job this is
80
+ */
81
+ type;
82
+ /**
83
+ * Array of enemy levels
84
+ */
85
+ enemyLevels;
86
+ /**
87
+ * Array of standing gains per stage of job
88
+ */
89
+ standingStages;
90
+ /**
91
+ * Minimum mastery required to participate
92
+ */
93
+ minMR;
94
+ /**
95
+ * Whether or not this is a Vault job.
96
+ * No indication for difference of normal vs arcana vaults.
97
+ */
98
+ isVault;
99
+ /**
100
+ * Corresponding chamber. Nullable
101
+ */
102
+ locationTag;
103
+ /**
104
+ * What time phase this bounty is bound to
105
+ */
106
+ timeBound;
107
+ /**
108
+ * Generate a job with async data (reward pool)
109
+ * @param data The syndicate mission data
110
+ * @param expiry The syndicate job expiration
111
+ * @param deps The dependencies object
112
+ * @returns The created SyndicateJob object with rewardPool
113
+ */
114
+ static async build(data, expiry, deps) {
115
+ const job = new SyndicateJob(data, expiry, deps);
116
+ const rewards = await getBountyRewards(data.rewards, data, data.isVault);
117
+ if (typeof rewards[0] === "string") job.rewardPool = rewards;
118
+ else {
119
+ job.rewardPoolDrops = rewards.map((reward) => {
120
+ const countReg = /([0-9]{1,10})X/;
121
+ const count = reward.item.match(countReg)?.[1];
122
+ return {
123
+ ...reward,
124
+ item: reward.item.replace(countReg, "").trim(),
125
+ count: count ? parseInt(count, 10) : 1
126
+ };
127
+ });
128
+ job.rewardPool = rewards.map((reward) => reward.item);
129
+ }
130
+ return job;
131
+ }
132
+ /**
133
+ * Construct a job without async data (reward pool)
134
+ * @param data The syndicate mission data
135
+ * @param expiry The syndicate job expiration
136
+ * @param deps The dependencies object
137
+ * @param deps.locale Locale to use for translations
138
+ *
139
+ * This DOES NOT populate the reward pool
140
+ */
141
+ constructor(data, expiry, { locale } = { locale: "en" }) {
142
+ super({ _id: { $oid: data.JobCurrentVersion ? data.JobCurrentVersion.$oid : `${(data.jobType || "").split("/").slice(-1)[0]}${expiry.getTime()}` } });
143
+ this.uniqueName = data.rewards;
144
+ this.rewardPool = [];
145
+ this.rewardPoolDrops = [];
146
+ const chamber = (data.locationTag || "").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").trim();
147
+ this.type = data.isVault ? `Isolation Vault ${chamber}` : data.jobType ? languageString(data.jobType, locale) : void 0;
148
+ this.enemyLevels = [data.minEnemyLevel, data.maxEnemyLevel];
149
+ this.standingStages = data.xpAmounts;
150
+ this.minMR = data.masteryReq || 0;
151
+ this.isVault = data.isVault;
152
+ this.locationTag = data.locationTag;
153
+ this.expiry = expiry;
154
+ const jobType = data.jobType ?? "";
155
+ if (jobType.toLowerCase().includes("narmer")) if (jobType.toLowerCase().includes("eidolon")) {
156
+ this.timeBound = "day";
157
+ this.expiry = new Date(this.expiry.getTime() - FIFTY_MINUTES);
158
+ } else this.timeBound = "night";
159
+ }
160
+ };
161
+
162
+ //#endregion
7
163
  export { SyndicateJob };
@@ -1,18 +1,59 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { g as SyndicateMission, h as RawSyndicateMission } 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 { RawSyndicateJob, SyndicateJob } from "./SyndicateJob.mjs";
5
+
6
+ //#region lib/models/SyndicateMission.d.ts
7
+ interface RawSyndicateMission extends BaseContentObject {
8
+ Tag: string;
9
+ Nodes: string[];
10
+ Jobs: RawSyndicateJob[];
11
+ }
12
+ /**
13
+ * Represents a syndicate daily mission
14
+ * @augments {WorldStateObject}
15
+ */
16
+ declare class SyndicateMission extends WorldStateObject {
17
+ /**
18
+ * The syndicate that is offering the mission
19
+ * @type {string}
20
+ */
21
+ syndicate: string;
22
+ /**
23
+ * The syndicate that is offering the mission
24
+ * @type {string}
25
+ */
26
+ syndicateKey: string;
27
+ /**
28
+ * The nodes on which the missions are taking place
29
+ * @type {Array.<string>}
30
+ */
31
+ nodes: string[];
32
+ /**
33
+ * The jobs for this syndicate. Will normally be []
34
+ * @type {Array.<SyndicateJob>}
35
+ */
36
+ jobs: SyndicateJob[];
37
+ /**
38
+ * Build a new SyndicateMission with async operations & data
39
+ * @param data The syndicate mission data
40
+ * @param deps The dependencies object
41
+ * @param deps.locale Locale to use for translations
42
+ * @returns SyndicateMission object w/ async resolution of jobs
43
+ */
44
+ static build(data: RawSyndicateMission, deps?: Dependency): Promise<SyndicateMission>;
45
+ /**
46
+ * @param data The syndicate mission data
47
+ * @param deps The dependencies object
48
+ * @param deps.locale Locale to use for translations
49
+ */
50
+ constructor(data: RawSyndicateMission, {
51
+ locale
52
+ }?: Dependency);
53
+ /**
54
+ * Time delta string from now to the expiry
55
+ */
56
+ get eta(): string;
57
+ }
58
+ //#endregion
18
59
  export { RawSyndicateMission, SyndicateMission };
@@ -1,8 +1,66 @@
1
- import "../../RewardTypes-DUrR7H3G.mjs";
2
- import "../../WorldStateObject-45dbRgp7.mjs";
3
- import "../../FetchProxy-Bkdk15SX.mjs";
4
- import "../../supporting-BLSXhlWM.mjs";
5
- import "../../SyndicateJob-R89tWqvT.mjs";
6
- import { t as SyndicateMission } from "../../SyndicateMission-CKZDWNyf.mjs";
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { SyndicateJob } from "./SyndicateJob.mjs";
3
+ import { fromNow, node, syndicate, timeDeltaToString } from "warframe-worldstate-data/utilities";
7
4
 
5
+ //#region lib/models/SyndicateMission.ts
6
+ /**
7
+ * Represents a syndicate daily mission
8
+ * @augments {WorldStateObject}
9
+ */
10
+ var SyndicateMission = class SyndicateMission extends WorldStateObject {
11
+ /**
12
+ * The syndicate that is offering the mission
13
+ * @type {string}
14
+ */
15
+ syndicate;
16
+ /**
17
+ * The syndicate that is offering the mission
18
+ * @type {string}
19
+ */
20
+ syndicateKey;
21
+ /**
22
+ * The nodes on which the missions are taking place
23
+ * @type {Array.<string>}
24
+ */
25
+ nodes;
26
+ /**
27
+ * The jobs for this syndicate. Will normally be []
28
+ * @type {Array.<SyndicateJob>}
29
+ */
30
+ jobs;
31
+ /**
32
+ * Build a new SyndicateMission with async operations & data
33
+ * @param data The syndicate mission data
34
+ * @param deps The dependencies object
35
+ * @param deps.locale Locale to use for translations
36
+ * @returns SyndicateMission object w/ async resolution of jobs
37
+ */
38
+ static async build(data, deps = { locale: "en" }) {
39
+ const syndicateMission = new SyndicateMission(data, deps);
40
+ if (data.Jobs?.length) syndicateMission.jobs = await Promise.all(data.Jobs.map((job) => SyndicateJob.build(job, syndicateMission.expiry, deps)));
41
+ else syndicateMission.jobs = [];
42
+ return syndicateMission;
43
+ }
44
+ /**
45
+ * @param data The syndicate mission data
46
+ * @param deps The dependencies object
47
+ * @param deps.locale Locale to use for translations
48
+ */
49
+ constructor(data, { locale = "en" } = { locale: "en" }) {
50
+ super(data);
51
+ this.syndicate = syndicate(data.Tag, locale);
52
+ this.syndicateKey = syndicate(data.Tag, "en");
53
+ this.nodes = data.Nodes.map((n) => node(n, locale));
54
+ this.jobs = [];
55
+ this.id = `${this.expiry.getTime()}${data.Tag}`;
56
+ }
57
+ /**
58
+ * Time delta string from now to the expiry
59
+ */
60
+ get eta() {
61
+ return timeDeltaToString(fromNow(this.expiry));
62
+ }
63
+ };
64
+
65
+ //#endregion
8
66
  export { SyndicateMission };
@@ -1,18 +1,35 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { m as Tmp, p as InitialTmp } 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 { Kinepage } from "./Kinepage.mjs";
4
+ import { SentientOutpost } from "./SentientOutpost.mjs";
5
+
6
+ //#region lib/models/Tmp.d.ts
7
+ interface InitialTmp {
8
+ sfn: number;
9
+ pgr: {
10
+ [k: string]: string | number;
11
+ };
12
+ fbst?: {
13
+ a: number;
14
+ e: number;
15
+ n: number;
16
+ };
17
+ QTCCFloofCount?: number;
18
+ QTCCFloofLimit?: number;
19
+ }
20
+ declare class Tmp {
21
+ sentientOutposts: SentientOutpost;
22
+ kinepage: Kinepage;
23
+ faceoffBonus?: {
24
+ activation: Date;
25
+ expiry: Date;
26
+ next: Date;
27
+ };
28
+ questToConquerCancer?: {
29
+ count: number;
30
+ goal: number;
31
+ };
32
+ constructor(json: string, deps?: Dependency);
33
+ }
34
+ //#endregion
18
35
  export { InitialTmp, Tmp };
@@ -1,4 +1,30 @@
1
- import "../../SentientOutpost-Cadk-pIW.mjs";
2
- import { t as Tmp } from "../../Tmp-BYL_mYIG.mjs";
1
+ import { Kinepage } from "./Kinepage.mjs";
2
+ import { SentientOutpost } from "./SentientOutpost.mjs";
3
3
 
4
+ //#region lib/models/Tmp.ts
5
+ var Tmp = class {
6
+ sentientOutposts;
7
+ kinepage;
8
+ faceoffBonus;
9
+ questToConquerCancer;
10
+ constructor(json, deps = { locale: "en" }) {
11
+ const tmp = JSON.parse(json);
12
+ this.sentientOutposts = new SentientOutpost(tmp.sfn, deps);
13
+ this.kinepage = new Kinepage(tmp.pgr, deps.locale);
14
+ if (tmp.fbst) {
15
+ const toDate = (ms) => /* @__PURE__ */ new Date(ms * 1e3);
16
+ this.faceoffBonus = {
17
+ activation: toDate(tmp.fbst.a),
18
+ expiry: toDate(tmp.fbst.e),
19
+ next: toDate(tmp.fbst.n)
20
+ };
21
+ }
22
+ if (tmp.QTCCFloofCount) this.questToConquerCancer = {
23
+ count: tmp.QTCCFloofCount,
24
+ goal: tmp.QTCCFloofLimit
25
+ };
26
+ }
27
+ };
28
+
29
+ //#endregion
4
30
  export { Tmp };
@@ -1,3 +1,30 @@
1
- import "../../WorldStateObject-C1HEDkH7.mjs";
2
- import { t as VallisCycle } from "../../VallisCycle-6DCaWFoR.mjs";
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+
3
+ //#region lib/models/VallisCycle.d.ts
4
+ /**
5
+ * Represents the current Earth Day/Night Cycle
6
+ * @augments {WorldStateObject}
7
+ */
8
+ declare class VallisCycle extends WorldStateObject {
9
+ #private;
10
+ /**
11
+ * Whether or not this it's daytime
12
+ */
13
+ isWarm: boolean;
14
+ /**
15
+ * Current cycle state. One of `warm`, `cold`
16
+ */
17
+ state: string;
18
+ constructor();
19
+ /**
20
+ * Whether this event has expired
21
+ */
22
+ get expired(): boolean;
23
+ /**
24
+ * Time remaining string
25
+ */
26
+ get timeLeft(): string;
27
+ get shortString(): string;
28
+ }
29
+ //#endregion
3
30
  export { VallisCycle };