koishi-plugin-warframe 1.13.1 → 1.15.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.
package/README.md CHANGED
@@ -39,6 +39,8 @@ Toolkit for Warframe. Provides Warframe Market prices, fissures, arbitrations, r
39
39
  | `weekly` | | `周常`, `科研`, `时光科研`, `深层科研`, `执行官` | Query weekly missions (Archon Hunt, Deep Archimedea, Temporal Archimedea). |
40
40
  | `circuit` | | `灵化之源`, `灵化` | Query weekly circuit rewards (warframes and incarnon adapters). |
41
41
  | `steel-essence` | | `钢铁精华` | Query this week's Steel Essence shop rotation (current offering, remaining time, upcoming). |
42
+ | `1999calendar` | | `日历`, `1999日历`, `霍瓦尼亚日历` | Query the current 1999 Höllvania calendar tagged days (challenges, overrides, rewards). |
43
+ | `event` | | `活动`, `事件` | Query active world events (progress, rewards, remaining time). |
42
44
 
43
45
  ### Open World Cycles
44
46
 
package/lib/index.d.ts CHANGED
@@ -34,7 +34,7 @@ declare module "warframe/types/ocr" {
34
34
  }
35
35
  }
36
36
  declare module "warframe/types/warframe-result" {
37
- export const warframeErrorCodes: readonly ["common.fetchFailed", "relic.invalidName", "relic.dataLoading", "relic.notFound", "arbitration.invalidDayRange", "bounty.unavailable", "invasion.unavailable", "alert.unavailable", "steelEssence.unavailable", "nightwave.unavailable", "sortie.unavailable", "voidTrader.drifting", "voidTrader.arriving", "riven.imageFetchFailed", "riven.imageParseFailed", "riven.weaponNotFound", "riven.dispositionError", "riven.weaponTypeError", "riven.statTypeError", "wfm.inputItemName", "wfm.itemNotFound", "wfm.itemAmbiguous", "wfm.orderFetchFailed", "wfm.noOnlineSeller", "wfm.rivenWeaponNotFound", "wfm.rivenOrderFetchFailed", "wfm.noOnlineRivenSeller", "miscs.hotRiven.noData", "miscs.hotRiven.fetchFailed"];
37
+ export const warframeErrorCodes: readonly ["common.fetchFailed", "relic.invalidName", "relic.dataLoading", "relic.notFound", "arbitration.invalidDayRange", "bounty.unavailable", "invasion.unavailable", "alert.unavailable", "event.unavailable", "calendar.unavailable", "steelEssence.unavailable", "nightwave.unavailable", "sortie.unavailable", "voidTrader.drifting", "voidTrader.arriving", "riven.imageFetchFailed", "riven.imageParseFailed", "riven.weaponNotFound", "riven.dispositionError", "riven.weaponTypeError", "riven.statTypeError", "wfm.inputItemName", "wfm.itemNotFound", "wfm.itemAmbiguous", "wfm.orderFetchFailed", "wfm.noOnlineSeller", "wfm.rivenWeaponNotFound", "wfm.rivenOrderFetchFailed", "wfm.noOnlineRivenSeller", "miscs.hotRiven.noData", "miscs.hotRiven.fetchFailed"];
38
38
  export type WarframeErrorCode = typeof warframeErrorCodes[number];
39
39
  export type WarframeErrorParams = Record<string, string | number>;
40
40
  export interface WarframeError {
@@ -186,6 +186,147 @@ declare module "warframe/types/wf/bounty" {
186
186
  zarimanFaction?: string;
187
187
  }
188
188
  }
189
+ declare module "warframe/types/wf/nightwave" {
190
+ export interface RawMongoDate {
191
+ $date?: {
192
+ $numberLong?: string | number;
193
+ };
194
+ }
195
+ export interface RawNightwaveActiveChallenge {
196
+ Challenge: string;
197
+ Daily?: boolean;
198
+ Permanent?: boolean | number | string;
199
+ Activation?: RawMongoDate;
200
+ Expiry?: RawMongoDate;
201
+ }
202
+ export interface RawSeasonInfo {
203
+ Season: number;
204
+ Phase: number;
205
+ AffiliationTag: string;
206
+ Expiry?: RawMongoDate;
207
+ ActiveChallenges: RawNightwaveActiveChallenge[];
208
+ }
209
+ export type NightwaveChallengeKind = 'daily' | 'weekly' | 'elite' | 'permanent';
210
+ export interface NightwaveChallengeInfo {
211
+ name: string;
212
+ description: string;
213
+ kind: NightwaveChallengeKind;
214
+ remaining: string;
215
+ standing?: number;
216
+ }
217
+ export interface NightwaveBoard {
218
+ title: string;
219
+ season: number;
220
+ phase: number;
221
+ expiry: number;
222
+ remaining: string;
223
+ challenges: NightwaveChallengeInfo[];
224
+ }
225
+ }
226
+ declare module "warframe/types/wf/calendar" {
227
+ import type { RawMongoDate } from "warframe/types/wf/nightwave";
228
+ export interface RawCalendarEvent {
229
+ type?: string;
230
+ challenge?: string;
231
+ upgrade?: string;
232
+ reward?: string;
233
+ dialogueName?: string;
234
+ dialogueConvo?: string;
235
+ }
236
+ export interface RawCalendarDay {
237
+ day?: number;
238
+ events?: RawCalendarEvent[];
239
+ }
240
+ export interface RawCalendarSeason {
241
+ Activation?: RawMongoDate;
242
+ Expiry?: RawMongoDate;
243
+ Days?: RawCalendarDay[];
244
+ Season?: string;
245
+ YearIteration?: number;
246
+ Version?: number;
247
+ UpgradeAvaliabilityRequirements?: string[];
248
+ }
249
+ export type CalendarEventKind = 'challenge' | 'upgrade' | 'reward' | 'birthday' | 'other';
250
+ export interface CalendarEventInfo {
251
+ kind: CalendarEventKind;
252
+ kindLabel: string;
253
+ name: string;
254
+ description?: string;
255
+ }
256
+ export interface CalendarDayInfo {
257
+ day: number;
258
+ dateLabel: string;
259
+ events: CalendarEventInfo[];
260
+ }
261
+ export interface CalendarBoard {
262
+ title: string;
263
+ season: string;
264
+ remaining: string;
265
+ expiry: number;
266
+ days: CalendarDayInfo[];
267
+ }
268
+ }
269
+ declare module "warframe/types/wf/event" {
270
+ import type { RawMongoDate } from "warframe/types/wf/nightwave";
271
+ import type { WFRegionShort } from "warframe/types/wf/region";
272
+ export interface RawEventCountedItem {
273
+ ItemType?: string;
274
+ ItemCount?: number;
275
+ type?: string;
276
+ key?: string;
277
+ count?: number;
278
+ }
279
+ export interface RawEventReward {
280
+ items?: string[];
281
+ countedItems?: RawEventCountedItem[];
282
+ credits?: number;
283
+ }
284
+ export interface RawWorldEvent {
285
+ _id?: {
286
+ $oid?: string;
287
+ $id?: string;
288
+ };
289
+ Activation?: RawMongoDate;
290
+ Expiry?: RawMongoDate;
291
+ Node?: string;
292
+ Count?: number;
293
+ Goal?: number;
294
+ HealthPct?: number;
295
+ Desc?: string;
296
+ ToolTip?: string;
297
+ ScoreLocTag?: string;
298
+ Tag?: string;
299
+ Reward?: RawEventReward;
300
+ InterimGoals?: number[];
301
+ InterimRewards?: RawEventReward[];
302
+ }
303
+ export interface EventReward {
304
+ name: string;
305
+ count: number;
306
+ }
307
+ export interface EventInterimStep {
308
+ goal: number;
309
+ rewards: EventReward[];
310
+ }
311
+ export interface EventInfo {
312
+ id: string;
313
+ name: string;
314
+ description?: string;
315
+ scoreLabel?: string;
316
+ node?: WFRegionShort;
317
+ remaining?: string;
318
+ expiry: number;
319
+ currentScore: number;
320
+ maximumScore: number;
321
+ progress?: number;
322
+ rewards: EventReward[];
323
+ interimSteps: EventInterimStep[];
324
+ }
325
+ export interface EventBoard {
326
+ title: string;
327
+ events: EventInfo[];
328
+ }
329
+ }
189
330
  declare module "warframe/types/wf/fissure" {
190
331
  import type { WFRegionShort } from "warframe/types/wf/region";
191
332
  export interface Fissure {
@@ -261,43 +402,6 @@ declare module "warframe/types/wf/invasion" {
261
402
  planets: InvasionPlanetGroup[];
262
403
  }
263
404
  }
264
- declare module "warframe/types/wf/nightwave" {
265
- export interface RawMongoDate {
266
- $date?: {
267
- $numberLong?: string | number;
268
- };
269
- }
270
- export interface RawNightwaveActiveChallenge {
271
- Challenge: string;
272
- Daily?: boolean;
273
- Permanent?: boolean | number | string;
274
- Activation?: RawMongoDate;
275
- Expiry?: RawMongoDate;
276
- }
277
- export interface RawSeasonInfo {
278
- Season: number;
279
- Phase: number;
280
- AffiliationTag: string;
281
- Expiry?: RawMongoDate;
282
- ActiveChallenges: RawNightwaveActiveChallenge[];
283
- }
284
- export type NightwaveChallengeKind = 'daily' | 'weekly' | 'elite' | 'permanent';
285
- export interface NightwaveChallengeInfo {
286
- name: string;
287
- description: string;
288
- kind: NightwaveChallengeKind;
289
- remaining: string;
290
- standing?: number;
291
- }
292
- export interface NightwaveBoard {
293
- title: string;
294
- season: number;
295
- phase: number;
296
- expiry: number;
297
- remaining: string;
298
- challenges: NightwaveChallengeInfo[];
299
- }
300
- }
301
405
  declare module "warframe/types/wf/relic" {
302
406
  export type RelicTier = 'Lith' | 'Meso' | 'Neo' | 'Axi' | 'Requiem' | 'Vanguard';
303
407
  export type RelicQuality = 'Intact' | 'Exceptional' | 'Flawless' | 'Radiant';
@@ -526,6 +630,8 @@ declare module "warframe/types/index" {
526
630
  export type { AlertBoard, AlertInfo, AlertReward } from "warframe/types/wf/alert";
527
631
  export type { Arbitration, ArbitrationShort } from "warframe/types/wf/arbitration";
528
632
  export type { BountyBoard, BountyJob, BountyLocation, BountyReward, BountyRewardRarity, BountyStandingUnit, OracleBountyCycle, OracleBountyEntry, RawSyndicateJob, RawSyndicateMission, } from "warframe/types/wf/bounty";
633
+ export type { CalendarBoard, CalendarDayInfo, CalendarEventInfo, CalendarEventKind, RawCalendarDay, RawCalendarEvent, RawCalendarSeason, } from "warframe/types/wf/calendar";
634
+ export type { EventBoard, EventInfo, EventInterimStep, EventReward, RawEventCountedItem, RawEventReward, RawWorldEvent, } from "warframe/types/wf/event";
529
635
  export type { Fissure } from "warframe/types/wf/fissure";
530
636
  export type { Invasion, InvasionBoard, InvasionFactionTone, InvasionPlanetGroup, InvasionReward, InvasionSide, RawInvasion, RawInvasionCountedItem, RawInvasionMissionInfo, RawInvasionReward, } from "warframe/types/wf/invasion";
531
637
  export type { NightwaveBoard, NightwaveChallengeInfo, NightwaveChallengeKind, RawMongoDate, RawNightwaveActiveChallenge, RawSeasonInfo, } from "warframe/types/wf/nightwave";
@@ -643,11 +749,13 @@ declare module "warframe/data/wf/archonHunt" {
643
749
  }
644
750
  declare module "warframe/infrastructure/wf/wf-api" {
645
751
  import type WorldState from 'warframe-worldstate-parser';
646
- import type { OracleBountyCycle, RawInvasion, RawSeasonInfo, RawSortie, RawSyndicateMission } from "warframe/types/index";
752
+ import type { OracleBountyCycle, RawCalendarSeason, RawInvasion, RawSeasonInfo, RawSortie, RawSyndicateMission, RawWorldEvent } from "warframe/types/index";
647
753
  export function extractSyndicateMissionsRaw(json: string): RawSyndicateMission[];
648
754
  export function extractSeasonInfoRaw(json: string): RawSeasonInfo | undefined;
649
755
  export function extractSortieRaw(json: string): RawSortie | undefined;
650
756
  export function extractInvasionsRaw(json: string): RawInvasion[];
757
+ export function extractEventsRaw(json: string): RawWorldEvent[];
758
+ export function extractCalendarRaw(json: string): RawCalendarSeason | undefined;
651
759
  export function fetchWorldStateJson(): Promise<string | undefined>;
652
760
  /** browse.wf Oracle bounty cycle (Zariman / Cavia / Hex). */
653
761
  export function fetchOracleBountyCycle(): Promise<OracleBountyCycle | undefined>;
@@ -734,7 +842,7 @@ declare module "warframe/infrastructure/wf/wfcd-adapter" {
734
842
  }
735
843
  declare module "warframe/data/wf/globalWorldState" {
736
844
  import type WorldState from 'warframe-worldstate-parser';
737
- import type { Fissure, RawSeasonInfo, RawSyndicateMission } from "warframe/types/index";
845
+ import type { Fissure, RawCalendarSeason, RawSeasonInfo, RawSyndicateMission, RawWorldEvent } from "warframe/types/index";
738
846
  type ParsedFissure = WorldState['fissures'][number];
739
847
  export function adaptFissure(fissure: ParsedFissure): Promise<Fissure>;
740
848
  export const globalWorldState: import("warframe").AsyncCache<{
@@ -743,6 +851,8 @@ declare module "warframe/data/wf/globalWorldState" {
743
851
  seasonInfoRaw: RawSeasonInfo | undefined;
744
852
  sortieRaw: import("warframe").RawSortie | undefined;
745
853
  invasionsRaw: import("warframe").RawInvasion[];
854
+ calendarRaw: RawCalendarSeason | undefined;
855
+ eventsRaw: RawWorldEvent[];
746
856
  fissures: Fissure[];
747
857
  spFissures: Fissure[];
748
858
  rjFissures: Fissure[];
@@ -923,14 +1033,31 @@ declare module "warframe/infrastructure/wf/bounty-adapter" {
923
1033
  export function formatOracleChallenge(challengePath: string): string;
924
1034
  export function adaptOracleBountyBoard(location: 'zariman' | 'cavia' | 'hex', cycle: OracleBountyCycle | undefined): BountyBoard | undefined;
925
1035
  }
1036
+ declare module "warframe/infrastructure/wf/calendar-adapter" {
1037
+ import type { CalendarBoard, RawCalendarSeason, RawMongoDate } from "warframe/types/index";
1038
+ export function calendarTimestampMs(value?: RawMongoDate): number;
1039
+ /** Strip Lotus color pipes and HTML-like markup tags. */
1040
+ export function stripLotusMarkup(text: string): string;
1041
+ export function adaptCalendar(raw: RawCalendarSeason | undefined, now?: number): CalendarBoard;
1042
+ }
926
1043
  declare module "warframe/infrastructure/wf/nightwave-adapter" {
927
1044
  import type { NightwaveBoard, RawSeasonInfo } from "warframe/types/index";
928
1045
  export function adaptNightwave(raw: RawSeasonInfo, now?: number): NightwaveBoard;
929
1046
  }
930
- declare module "warframe/services/wf-service" {
1047
+ declare module "warframe/services/wf-service/wf-service.event" {
1048
+ import type { EventBoard, RawWorldEvent, WarframeResult } from "warframe/types/index";
1049
+ export function adaptEvents(rawEvents?: readonly RawWorldEvent[], now?: number): EventBoard;
1050
+ export function getEventsFrom(snapshot?: {
1051
+ raw?: unknown;
1052
+ eventsRaw?: RawWorldEvent[];
1053
+ }, now?: number): Promise<WarframeResult<EventBoard>>;
1054
+ export function getEvents(): Promise<WarframeResult<EventBoard>>;
1055
+ }
1056
+ declare module "warframe/services/wf-service/index" {
931
1057
  import type { WeeklyRiven } from 'warframe-weekly-rivens';
932
- import type { AlertBoard, Arbitration, ArchiMedea, ArchonHunt, BountyBoard, BountyLocation, Fissure, InvasionBoard, NightwaveBoard, OcrAPISecret, RawInvasion, RawSeasonInfo, RawSortie, RawSteelPathOfferings, Relic, RivenAttribute, RivenStatAnalyzeResult, RivenStatResult, Sortie, SteelEssenceBoard, VoidTrader, WarframeResult } from "warframe/types/index";
1058
+ import type { AlertBoard, Arbitration, ArchiMedea, ArchonHunt, BountyBoard, BountyLocation, CalendarBoard, Fissure, InvasionBoard, NightwaveBoard, OcrAPISecret, RawCalendarSeason, RawInvasion, RawSeasonInfo, RawSortie, RawSteelPathOfferings, Relic, RivenAttribute, RivenStatAnalyzeResult, RivenStatResult, Sortie, SteelEssenceBoard, VoidTrader, WarframeResult } from "warframe/types/index";
933
1059
  import { weaponRivenDispositionDict } from "warframe/data/wf/rivenDisposition";
1060
+ export { adaptEvents, getEvents, getEventsFrom } from "warframe/services/wf-service/wf-service.event";
934
1061
  export function getRelic(input: string): Promise<WarframeResult<Relic>>;
935
1062
  export function getArbitrations(day?: number): WarframeResult<Arbitration[]>;
936
1063
  export function adaptArchonHunt(source: {
@@ -996,6 +1123,12 @@ declare module "warframe/services/wf-service" {
996
1123
  };
997
1124
  }[], now?: number): Promise<AlertBoard>;
998
1125
  export function getAlerts(): Promise<WarframeResult<AlertBoard>>;
1126
+ export function adaptCalendar(raw: RawCalendarSeason | undefined, now?: number): CalendarBoard;
1127
+ export function getCalendarFrom(snapshot?: {
1128
+ raw?: unknown;
1129
+ calendarRaw?: RawCalendarSeason;
1130
+ }, now?: number): Promise<WarframeResult<CalendarBoard>>;
1131
+ export function getCalendar(): Promise<WarframeResult<CalendarBoard>>;
999
1132
  export function adaptSteelEssence(raw?: RawSteelPathOfferings, now?: number): Promise<SteelEssenceBoard>;
1000
1133
  export function getSteelEssenceFrom(snapshot?: {
1001
1134
  raw?: {
@@ -1195,7 +1328,7 @@ declare module "warframe/services/world-state-refresh" {
1195
1328
  }
1196
1329
  declare module "warframe/services/index" {
1197
1330
  export * from "warframe/services/miscs-service";
1198
- export * from "warframe/services/wf-service";
1331
+ export * from "warframe/services/wf-service/index";
1199
1332
  export * from "warframe/services/wfm-service/index";
1200
1333
  export * from "warframe/services/world-state-refresh";
1201
1334
  }
@@ -1216,6 +1349,8 @@ declare module "i18n" {
1216
1349
  readonly 'bounty.unavailable': "当前该地点暂无可用赏金";
1217
1350
  readonly 'invasion.unavailable': "当前没有入侵";
1218
1351
  readonly 'alert.unavailable': "当前没有警报";
1352
+ readonly 'event.unavailable': "当前没有活动";
1353
+ readonly 'calendar.unavailable': "当前没有1999日历";
1219
1354
  readonly 'steelEssence.unavailable': "钢铁精华商店获取失败";
1220
1355
  readonly 'nightwave.unavailable': "当前没有午夜电波";
1221
1356
  readonly 'sortie.unavailable': "当前没有突击";
@@ -1281,7 +1416,7 @@ declare module "utils/index" {
1281
1416
  declare module "components/wf" {
1282
1417
  import type { Element } from 'koishi';
1283
1418
  import type { WeeklyRiven } from 'warframe-weekly-rivens';
1284
- import type { AlertBoard, Arbitration, ArchiMedea, ArchonHunt, BountyBoard, Fissure, InvasionBoard, NightwaveBoard, OutputRelic, RivenStatAnalyzeResult, RivenStatResult, Sortie, SteelEssenceBoard, VoidTrader } from "warframe/index";
1419
+ import type { AlertBoard, Arbitration, ArchiMedea, ArchonHunt, BountyBoard, CalendarBoard, EventBoard, Fissure, InvasionBoard, NightwaveBoard, OutputRelic, RivenStatAnalyzeResult, RivenStatResult, Sortie, SteelEssenceBoard, VoidTrader } from "warframe/index";
1285
1420
  export function ArbitrationComponent(arbi: Arbitration[]): Element;
1286
1421
  export function CircuitComponent(currentIncarnons: number, currentWarframes: number, allIncarnons: string[][], allWarframes: string[][]): Element;
1287
1422
  export function FissureComponent(fissures: Fissure[], type: 'fissure' | 'sp-fissure' | 'rj-fissure'): Element;
@@ -1296,6 +1431,8 @@ declare module "components/wf" {
1296
1431
  export function RivenStatComponent(data: RivenStatResult): Element;
1297
1432
  export function VoidTraderComponent(data: VoidTrader): Element;
1298
1433
  export function AlertComponent(board: AlertBoard): Element;
1434
+ export function EventComponent(board: EventBoard): Element;
1435
+ export function CalendarComponent(board: CalendarBoard): Element;
1299
1436
  export function SteelEssenceComponent(board: SteelEssenceBoard): Element;
1300
1437
  }
1301
1438
  declare module "commands/wf" {
@@ -1308,6 +1445,8 @@ declare module "commands/wf" {
1308
1445
  fissureCommand: (_action: Argv) => Promise<string>;
1309
1446
  invasionCommand: (_action: Argv) => Promise<string>;
1310
1447
  alertCommand: (_action: Argv) => Promise<string>;
1448
+ eventCommand: (_action: Argv) => Promise<string>;
1449
+ calendarCommand: (_action: Argv) => Promise<string>;
1311
1450
  steelEssenceCommand: (_action: Argv) => Promise<string>;
1312
1451
  steelPathFissureCommand: (_action: Argv) => Promise<string>;
1313
1452
  railjackFissureCommand: (_action: Argv) => Promise<string>;