koishi-plugin-warframe 1.8.7 → 1.9.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/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", "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", "nightwave.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 {
@@ -181,6 +181,43 @@ declare module "warframe/types/wf/fissure" {
181
181
  tierNum: number;
182
182
  }
183
183
  }
184
+ declare module "warframe/types/wf/nightwave" {
185
+ export interface RawMongoDate {
186
+ $date?: {
187
+ $numberLong?: string | number;
188
+ };
189
+ }
190
+ export interface RawNightwaveActiveChallenge {
191
+ Challenge: string;
192
+ Daily?: boolean;
193
+ Permanent?: boolean | number | string;
194
+ Activation?: RawMongoDate;
195
+ Expiry?: RawMongoDate;
196
+ }
197
+ export interface RawSeasonInfo {
198
+ Season: number;
199
+ Phase: number;
200
+ AffiliationTag: string;
201
+ Expiry?: RawMongoDate;
202
+ ActiveChallenges: RawNightwaveActiveChallenge[];
203
+ }
204
+ export type NightwaveChallengeKind = 'daily' | 'weekly' | 'elite' | 'permanent';
205
+ export interface NightwaveChallengeInfo {
206
+ name: string;
207
+ description: string;
208
+ kind: NightwaveChallengeKind;
209
+ remaining: string;
210
+ standing?: number;
211
+ }
212
+ export interface NightwaveBoard {
213
+ title: string;
214
+ season: number;
215
+ phase: number;
216
+ expiry: number;
217
+ remaining: string;
218
+ challenges: NightwaveChallengeInfo[];
219
+ }
220
+ }
184
221
  declare module "warframe/types/wf/relic" {
185
222
  export type RelicTier = 'Lith' | 'Meso' | 'Neo' | 'Axi' | 'Requiem' | 'Vanguard';
186
223
  export type RelicQuality = 'Intact' | 'Exceptional' | 'Flawless' | 'Radiant';
@@ -319,6 +356,7 @@ declare module "warframe/types/wf/voidtrader" {
319
356
  declare module "warframe/types/wf/weekly" {
320
357
  import type { WFRegionShort } from "warframe/types/wf/region";
321
358
  export interface ArchonHunt {
359
+ modeName: string;
322
360
  name: string;
323
361
  missions: ArchonHuntMissions[];
324
362
  }
@@ -349,6 +387,7 @@ declare module "warframe/types/index" {
349
387
  export type { Arbitration, ArbitrationShort } from "warframe/types/wf/arbitration";
350
388
  export type { BountyBoard, BountyJob, BountyLocation, BountyReward, BountyRewardRarity, BountyStandingUnit, OracleBountyCycle, OracleBountyEntry, RawSyndicateJob, RawSyndicateMission, } from "warframe/types/wf/bounty";
351
389
  export type { Fissure } from "warframe/types/wf/fissure";
390
+ export type { NightwaveBoard, NightwaveChallengeInfo, NightwaveChallengeKind, RawMongoDate, RawNightwaveActiveChallenge, RawSeasonInfo, } from "warframe/types/wf/nightwave";
352
391
  export type { WFRegion, WFRegionShort } from "warframe/types/wf/region";
353
392
  export type { ExternalRelic, ExternalRelicReward, OutputRelic, OutputRelicReward, Relic, RelicQuality, RelicReward, RelicRewardRarity, RelicTier, } from "warframe/types/wf/relic";
354
393
  export type { RivenStatAnalyzeResult, RivenStatAnalyzsis, RivenStatCountType, RivenStatFixFactor, RivenStatFixFactorMap, RivenStatResult, RivenWeaponDisposition, RivenWeaponType, } from "warframe/types/wf/riven";
@@ -452,10 +491,18 @@ declare module "warframe/data/wf/arbitrationSchedule" {
452
491
  import type { ArbitrationShort } from "warframe/types/index";
453
492
  export const arbitrationSchedule: ArbitrationShort[];
454
493
  }
494
+ declare module "warframe/data/wf/archonHunt" {
495
+ export function getArchonHuntModeName(): string;
496
+ export function getArchonHuntEnemyLevels(index: number): {
497
+ minLevel: number;
498
+ maxLevel: number;
499
+ };
500
+ }
455
501
  declare module "warframe/infrastructure/wf/wf-api" {
456
502
  import type WorldState from 'warframe-worldstate-parser';
457
- import type { OracleBountyCycle, RawSyndicateMission } from "warframe/types/index";
503
+ import type { OracleBountyCycle, RawSeasonInfo, RawSyndicateMission } from "warframe/types/index";
458
504
  export function extractSyndicateMissionsRaw(json: string): RawSyndicateMission[];
505
+ export function extractSeasonInfoRaw(json: string): RawSeasonInfo | undefined;
459
506
  export function fetchWorldStateJson(): Promise<string | undefined>;
460
507
  /** browse.wf Oracle bounty cycle (Zariman / Cavia / Hex). */
461
508
  export function fetchOracleBountyCycle(): Promise<OracleBountyCycle | undefined>;
@@ -526,12 +573,13 @@ declare module "warframe/infrastructure/wf/wfcd-adapter" {
526
573
  }
527
574
  declare module "warframe/data/wf/globalWorldState" {
528
575
  import type WorldState from 'warframe-worldstate-parser';
529
- import type { Fissure, RawSyndicateMission } from "warframe/types/index";
576
+ import type { Fissure, RawSeasonInfo, RawSyndicateMission } from "warframe/types/index";
530
577
  type ParsedFissure = WorldState['fissures'][number];
531
578
  export function adaptFissure(fissure: ParsedFissure): Promise<Fissure>;
532
579
  export const globalWorldState: import("warframe").AsyncCache<{
533
580
  raw: WorldState;
534
581
  syndicateMissionsRaw: RawSyndicateMission[];
582
+ seasonInfoRaw: RawSeasonInfo | undefined;
535
583
  fissures: Fissure[];
536
584
  spFissures: Fissure[];
537
585
  rjFissures: Fissure[];
@@ -705,17 +753,31 @@ declare module "warframe/infrastructure/wf/bounty-adapter" {
705
753
  export function formatOracleChallenge(challengePath: string): string;
706
754
  export function adaptOracleBountyBoard(location: 'zariman' | 'cavia' | 'hex', cycle: OracleBountyCycle | undefined): BountyBoard | undefined;
707
755
  }
756
+ declare module "warframe/infrastructure/wf/nightwave-adapter" {
757
+ import type { NightwaveBoard, RawSeasonInfo } from "warframe/types/index";
758
+ export function adaptNightwave(raw: RawSeasonInfo, now?: number): NightwaveBoard;
759
+ }
708
760
  declare module "warframe/services/wf-service" {
709
761
  import type { WeeklyRiven } from 'warframe-weekly-rivens';
710
- import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, BountyLocation, Fissure, OcrAPISecret, Relic, RivenAttribute, RivenStatAnalyzeResult, RivenStatResult, VoidTrader, WarframeResult } from "warframe/types/index";
762
+ import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, BountyLocation, Fissure, NightwaveBoard, OcrAPISecret, RawSeasonInfo, Relic, RivenAttribute, RivenStatAnalyzeResult, RivenStatResult, VoidTrader, WarframeResult } from "warframe/types/index";
711
763
  import { weaponRivenDispositionDict } from "warframe/data/wf/rivenDisposition";
712
764
  export function getRelic(input: string): Promise<WarframeResult<Relic>>;
713
765
  export function getArbitrations(day?: number): WarframeResult<Arbitration[]>;
766
+ export function adaptArchonHunt(source: {
767
+ boss: string;
768
+ missions?: Array<{
769
+ type: string;
770
+ node?: string;
771
+ nodeKey: string;
772
+ }>;
773
+ }): Promise<ArchonHunt>;
714
774
  export function getWeekly(): Promise<WarframeResult<{
715
775
  archonHunt: ArchonHunt;
716
776
  deepArchimedea: ArchiMedea;
717
777
  temporalArchimedea: ArchiMedea;
718
778
  }>>;
779
+ export function resolveNightwave(raw: RawSeasonInfo | undefined, now?: number): WarframeResult<NightwaveBoard>;
780
+ export function getNightwave(): Promise<WarframeResult<NightwaveBoard>>;
719
781
  export function getEnvironment(): Promise<string>;
720
782
  export function getBounty(location: BountyLocation): Promise<WarframeResult<BountyBoard>>;
721
783
  export function getCircuitWeek(): {
@@ -935,6 +997,7 @@ declare module "i18n" {
935
997
  readonly 'relic.notFound': "未找到对应遗物信息";
936
998
  readonly 'arbitration.invalidDayRange': "天数需小于等于14且大于0";
937
999
  readonly 'bounty.unavailable': "当前该地点暂无可用赏金";
1000
+ readonly 'nightwave.unavailable': "当前没有午夜电波";
938
1001
  readonly 'voidTrader.drifting': "虚空商人仍在未知地带漂流...";
939
1002
  readonly 'voidTrader.arriving': "距离虚空商人到达还有: {time}";
940
1003
  readonly 'riven.imageNotFound': "未检测到图片";
@@ -997,13 +1060,14 @@ declare module "utils/index" {
997
1060
  declare module "components/wf" {
998
1061
  import type { Element } from 'koishi';
999
1062
  import type { WeeklyRiven } from 'warframe-weekly-rivens';
1000
- import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, Fissure, OutputRelic, RivenStatAnalyzeResult, RivenStatResult, VoidTrader } from "warframe/index";
1063
+ import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, Fissure, NightwaveBoard, OutputRelic, RivenStatAnalyzeResult, RivenStatResult, VoidTrader } from "warframe/index";
1001
1064
  export function ArbitrationComponent(arbi: Arbitration[]): Element;
1002
1065
  export function CircuitComponent(currentIncarnons: number, currentWarframes: number, allIncarnons: string[][], allWarframes: string[][]): Element;
1003
1066
  export function FissureComponent(fissures: Fissure[], type: 'fissure' | 'sp-fissure' | 'rj-fissure'): Element;
1004
1067
  export function BountyComponent(board: BountyBoard): Element;
1005
1068
  export function WeeklyRivenComponent(items: WeeklyRiven[], minPrice: number): Element;
1006
1069
  export function WeeklyComponent(archon: ArchonHunt, deepArchimedea: ArchiMedea, temporalArchimedea: ArchiMedea): Element;
1070
+ export function NightwaveComponent(board: NightwaveBoard): Element;
1007
1071
  export function RelicComponent(relic: OutputRelic): Element;
1008
1072
  export function RivenComponent(data: RivenStatAnalyzeResult): Element;
1009
1073
  export function RivenStatComponent(data: RivenStatResult): Element;
@@ -1023,6 +1087,7 @@ declare module "commands/wf" {
1023
1087
  rivenCommand: (_action: Argv, input: Dict) => Promise<string>;
1024
1088
  rivenStatCommand: (_action: Argv, weaponType: string, statType: string, disposition: number) => Promise<string>;
1025
1089
  weeklyCommand: (_action: Argv) => Promise<string>;
1090
+ nightwaveCommand: (_action: Argv) => Promise<string>;
1026
1091
  weeklyRivenCommand: (_action: Argv, minPrice?: number) => Promise<string>;
1027
1092
  environmentCommand: () => Promise<string>;
1028
1093
  bountyCetusCommand: () => Promise<string>;