koishi-plugin-warframe 1.15.0 → 1.16.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", "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"];
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", "riven.unverifiedStat", "riven.variantRequired", "riven.variantError", "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 {
@@ -472,10 +472,59 @@ declare module "warframe/types/wfm" {
472
472
  };
473
473
  };
474
474
  }
475
+ declare module "warframe/types/wf/riven-export" {
476
+ export interface RivenExportEntry {
477
+ tag: string;
478
+ prefixTag?: string;
479
+ suffixTag?: string;
480
+ upgradeValues: {
481
+ value: number;
482
+ locTag?: string;
483
+ reverseValueSymbol?: boolean;
484
+ }[];
485
+ }
486
+ export interface RivenExportDefinition {
487
+ uniqueName: string;
488
+ upgradeEntries: RivenExportEntry[];
489
+ }
490
+ export interface RivenExportWeapon {
491
+ uniqueName: string;
492
+ name: string;
493
+ productCategory: string;
494
+ omegaAttenuation: number;
495
+ primeOmegaAttenuation?: number;
496
+ slot?: number;
497
+ }
498
+ export interface RivenPublicExport {
499
+ schemaVersion: number;
500
+ downloadedAt: string;
501
+ sources: Record<string, {
502
+ url: string;
503
+ sha256: string;
504
+ bytes: number;
505
+ }>;
506
+ upgrades: RivenExportDefinition[];
507
+ upgradesZh: RivenExportDefinition[];
508
+ weapons: RivenExportWeapon[];
509
+ weaponNamesZh: Record<string, string>;
510
+ }
511
+ }
475
512
  declare module "warframe/types/wf/riven" {
476
- import type { IWeapon } from 'warframe-public-export-plus';
477
513
  import type { RivenAttributeUnit } from "warframe/types/wfm";
478
- export type RivenWeaponType = 'Rifle' | 'Shotgun' | 'Pistol' | 'Archgun' | 'Melee';
514
+ import type { RivenExportWeapon } from "warframe/types/wf/riven-export";
515
+ export type RivenWeaponType = 'Rifle' | 'Shotgun' | 'Pistol' | 'Archgun' | 'Melee' | 'Kitgun' | 'Zaw';
516
+ export interface RivenCalculationAttribute {
517
+ gameRef?: string;
518
+ unit?: RivenAttributeUnit;
519
+ i18n?: {
520
+ 'en'?: {
521
+ name?: string;
522
+ };
523
+ 'zh-hans'?: {
524
+ name?: string;
525
+ };
526
+ };
527
+ }
479
528
  export type RivenStatCountType = '31' | '2' | '21' | '3';
480
529
  export interface RivenStatFixFactor {
481
530
  buffFactor: number;
@@ -493,6 +542,7 @@ declare module "warframe/types/wf/riven" {
493
542
  min: number;
494
543
  }
495
544
  export interface RivenStatAnalyzeResult {
545
+ notes?: string[];
496
546
  name: string;
497
547
  disposition: number;
498
548
  buffs: RivenStatAnalyzsis[];
@@ -509,9 +559,10 @@ declare module "warframe/types/wf/riven" {
509
559
  texture: string;
510
560
  riventype: string;
511
561
  };
512
- weapon: IWeapon;
562
+ weapon: RivenExportWeapon;
513
563
  }
514
564
  export interface RivenStatResult {
565
+ notes?: string[];
515
566
  positive: Record<string, {
516
567
  name: string;
517
568
  max: number;
@@ -716,7 +767,7 @@ declare module "warframe/services/miscs-service" {
716
767
  export function getHotRivenWeapons(): Promise<WarframeResult<RivenWeaponItem[]>>;
717
768
  }
718
769
  declare module "warframe/assets/index" {
719
- import type { RivenWeaponDisposition } from "warframe/types/index";
770
+ import type { RivenPublicExport } from "warframe/types/wf/riven-export";
720
771
  export interface BaroParsedItem {
721
772
  name: string;
722
773
  last: string;
@@ -724,10 +775,7 @@ declare module "warframe/assets/index" {
724
775
  }
725
776
  export type ArbyRewards = Record<string, number>;
726
777
  export const incarnons: string[][], warframes: string[][];
727
- export const rivenAttrValues: Record<string, Record<string, number>>;
728
- export const rivenCalc: {
729
- weapons: RivenWeaponDisposition["calc"][];
730
- };
778
+ export const rivenPublicExport: RivenPublicExport;
731
779
  export const dictEnExtra: Record<string, string>;
732
780
  export const dictZhExtra: Record<string, string>;
733
781
  export const arbitrationScheduleText: string;
@@ -736,17 +784,6 @@ declare module "warframe/assets/index" {
736
784
  export const BaroParsed: BaroParsedItem[];
737
785
  export const warframeAlias: Record<string, string[]>;
738
786
  }
739
- declare module "warframe/data/wf/arbitrationSchedule" {
740
- import type { ArbitrationShort } from "warframe/types/index";
741
- export const arbitrationSchedule: ArbitrationShort[];
742
- }
743
- declare module "warframe/data/wf/archonHunt" {
744
- export function getArchonHuntModeName(): string;
745
- export function getArchonHuntEnemyLevels(index: number): {
746
- minLevel: number;
747
- maxLevel: number;
748
- };
749
- }
750
787
  declare module "warframe/infrastructure/wf/wf-api" {
751
788
  import type WorldState from 'warframe-worldstate-parser';
752
789
  import type { OracleBountyCycle, RawCalendarSeason, RawInvasion, RawSeasonInfo, RawSortie, RawSyndicateMission, RawWorldEvent } from "warframe/types/index";
@@ -776,11 +813,6 @@ declare module "warframe/infrastructure/wf/wf-api" {
776
813
  [itemName: string]: VoidTraderItem;
777
814
  }
778
815
  }
779
- declare module "warframe/data/wf/globalOracleBountyCycle" {
780
- import type { AsyncCache, OracleBountyCycle } from "warframe/types/index";
781
- export let globalOracleBountyCycle: AsyncCache<OracleBountyCycle | undefined>;
782
- export function overrideGlobalOracleBountyCycle(cache: AsyncCache<OracleBountyCycle | undefined>): void;
783
- }
784
816
  declare module "warframe/infrastructure/wf/wf-export-adapter" {
785
817
  import type { IRegion } from 'warframe-public-export-plus';
786
818
  import type { RelicQuality, WFRegionShort } from "warframe/types/index";
@@ -842,44 +874,187 @@ declare module "warframe/infrastructure/wf/wfcd-adapter" {
842
874
  }
843
875
  declare module "warframe/data/wf/globalWorldState" {
844
876
  import type WorldState from 'warframe-worldstate-parser';
845
- import type { Fissure, RawCalendarSeason, RawSeasonInfo, RawSyndicateMission, RawWorldEvent } from "warframe/types/index";
877
+ import type { AsyncCache, Fissure, RawCalendarSeason, RawInvasion, RawSeasonInfo, RawSortie, RawSyndicateMission, RawWorldEvent } from "warframe/types/index";
846
878
  type ParsedFissure = WorldState['fissures'][number];
847
- export function adaptFissure(fissure: ParsedFissure): Promise<Fissure>;
848
- export const globalWorldState: import("warframe").AsyncCache<{
879
+ export interface GlobalWorldStateData {
849
880
  raw: WorldState;
850
881
  syndicateMissionsRaw: RawSyndicateMission[];
851
882
  seasonInfoRaw: RawSeasonInfo | undefined;
852
- sortieRaw: import("warframe").RawSortie | undefined;
853
- invasionsRaw: import("warframe").RawInvasion[];
883
+ sortieRaw: RawSortie | undefined;
884
+ invasionsRaw: RawInvasion[];
854
885
  calendarRaw: RawCalendarSeason | undefined;
855
886
  eventsRaw: RawWorldEvent[];
856
887
  fissures: Fissure[];
857
888
  spFissures: Fissure[];
858
889
  rjFissures: Fissure[];
859
- }>;
890
+ }
891
+ export function adaptFissure(fissure: ParsedFissure): Promise<Fissure>;
892
+ export function globalWorldStateFactory(json?: string): Promise<GlobalWorldStateData>;
893
+ export let globalWorldState: AsyncCache<GlobalWorldStateData>;
894
+ export function overrideGlobalWorldState(cache: AsyncCache<GlobalWorldStateData>): void;
895
+ }
896
+ declare module "warframe/infrastructure/wf/bounty-adapter" {
897
+ import type { BountyBoard, BountyLocation, BountyRewardRarity, OracleBountyCycle, RawSyndicateMission } from "warframe/types/index";
898
+ export const bountyLocationTag: Record<BountyLocation, string>;
899
+ /** Locations whose Jobs are empty in official WorldState; use browse.wf Oracle. */
900
+ export const oracleBountyLocations: Set<BountyLocation>;
901
+ /**
902
+ * Map drop probability to 铜/银/金 within one stage.
903
+ * Highest unique probability → bronze, lowest → gold, middle → silver.
904
+ * With only two buckets: highest → bronze, lower → silver.
905
+ */
906
+ export function rarityFromStageProbabilities(probability: number, uniqueSortedDesc: number[]): BountyRewardRarity;
907
+ export function resolveExportItemNameZh(sourceKey: string): string;
908
+ export function adaptBountyBoard(location: BountyLocation, mission: RawSyndicateMission | undefined): BountyBoard | undefined;
909
+ export function findRawSyndicateMission(missions: RawSyndicateMission[], location: BountyLocation): RawSyndicateMission | undefined;
910
+ export function formatOracleChallenge(challengePath: string): string;
911
+ export function adaptOracleBountyBoard(location: 'zariman' | 'cavia' | 'hex', cycle: OracleBountyCycle | undefined): BountyBoard | undefined;
912
+ }
913
+ declare module "warframe/services/wf-service/wf-service.alert" {
914
+ import type { AlertBoard, WarframeResult } from "warframe/types/index";
915
+ export function adaptAlerts(alerts?: readonly {
916
+ expiry?: Date;
917
+ mission?: {
918
+ nodeKey?: string;
919
+ typeKey?: string;
920
+ minEnemyLevel?: number;
921
+ maxEnemyLevel?: number;
922
+ nightmare?: boolean;
923
+ reward?: {
924
+ items?: string[];
925
+ countedItems?: Array<{
926
+ type?: string;
927
+ key?: string;
928
+ count?: number;
929
+ }>;
930
+ credits?: number;
931
+ };
932
+ };
933
+ }[], now?: number): Promise<AlertBoard>;
934
+ export function getAlerts(): Promise<WarframeResult<AlertBoard>>;
935
+ }
936
+ declare module "warframe/data/wf/arbitrationSchedule" {
937
+ import type { ArbitrationShort } from "warframe/types/index";
938
+ export const arbitrationSchedule: ArbitrationShort[];
939
+ }
940
+ declare module "warframe/services/wf-service/wf-service.arbitration" {
941
+ import type { Arbitration, WarframeResult } from "warframe/types/index";
942
+ export function getArbitrations(day?: number): WarframeResult<Arbitration[]>;
943
+ }
944
+ declare module "warframe/data/wf/globalOracleBountyCycle" {
945
+ import type { AsyncCache, OracleBountyCycle } from "warframe/types/index";
946
+ export let globalOracleBountyCycle: AsyncCache<OracleBountyCycle | undefined>;
947
+ export function overrideGlobalOracleBountyCycle(cache: AsyncCache<OracleBountyCycle | undefined>): void;
948
+ }
949
+ declare module "warframe/services/wf-service/wf-service.bounty" {
950
+ import type { BountyBoard, BountyLocation, WarframeResult } from "warframe/types/index";
951
+ export function getBounty(location: BountyLocation): Promise<WarframeResult<BountyBoard>>;
952
+ }
953
+ declare module "warframe/infrastructure/wf/calendar-adapter" {
954
+ import type { CalendarBoard, RawCalendarSeason, RawMongoDate } from "warframe/types/index";
955
+ export function calendarTimestampMs(value?: RawMongoDate): number;
956
+ /** Strip Lotus color pipes and HTML-like markup tags. */
957
+ export function stripLotusMarkup(text: string): string;
958
+ export function adaptCalendar(raw: RawCalendarSeason | undefined, now?: number): CalendarBoard;
959
+ }
960
+ declare module "warframe/services/wf-service/wf-service.calendar" {
961
+ import type { CalendarBoard, RawCalendarSeason, WarframeResult } from "warframe/types/index";
962
+ export function adaptCalendar(raw: RawCalendarSeason | undefined, now?: number): CalendarBoard;
963
+ export function getCalendarFrom(snapshot?: {
964
+ raw?: unknown;
965
+ calendarRaw?: RawCalendarSeason;
966
+ }, now?: number): Promise<WarframeResult<CalendarBoard>>;
967
+ export function getCalendar(): Promise<WarframeResult<CalendarBoard>>;
968
+ }
969
+ declare module "warframe/services/wf-service/wf-service.circuit" {
970
+ export function getCircuitWeek(): {
971
+ currentIncarnons: number;
972
+ currentWarframes: number;
973
+ allIncarnons: string[][];
974
+ allWarframes: string[][];
975
+ };
976
+ }
977
+ declare module "warframe/services/wf-service/wf-service.environment" {
978
+ export function getEnvironment(): Promise<string>;
979
+ }
980
+ declare module "warframe/services/wf-service/wf-service.event" {
981
+ import type { EventBoard, RawWorldEvent, WarframeResult } from "warframe/types/index";
982
+ export function adaptEvents(rawEvents?: readonly RawWorldEvent[], now?: number): EventBoard;
983
+ export function getEventsFrom(snapshot?: {
984
+ raw?: unknown;
985
+ eventsRaw?: RawWorldEvent[];
986
+ }, now?: number): Promise<WarframeResult<EventBoard>>;
987
+ export function getEvents(): Promise<WarframeResult<EventBoard>>;
988
+ }
989
+ declare module "warframe/services/wf-service/wf-service.fissure" {
990
+ import type { Fissure, WarframeResult } from "warframe/types/index";
991
+ export function getFissures(): Promise<WarframeResult<Fissure[]>>;
992
+ export function getSteelPathFissures(): Promise<WarframeResult<Fissure[]>>;
993
+ export function getRailjackFissures(): Promise<WarframeResult<Fissure[]>>;
994
+ }
995
+ declare module "warframe/services/wf-service/wf-service.invasion" {
996
+ import type { InvasionBoard, RawInvasion, WarframeResult } from "warframe/types/index";
997
+ export function adaptInvasions(rawInvasions: RawInvasion[]): Promise<InvasionBoard>;
998
+ export function getInvasionsFrom(snapshot?: {
999
+ raw?: unknown;
1000
+ invasionsRaw?: RawInvasion[];
1001
+ }): Promise<WarframeResult<InvasionBoard>>;
1002
+ export function getInvasions(): Promise<WarframeResult<InvasionBoard>>;
1003
+ }
1004
+ declare module "warframe/infrastructure/wf/nightwave-adapter" {
1005
+ import type { NightwaveBoard, RawSeasonInfo } from "warframe/types/index";
1006
+ export function adaptNightwave(raw: RawSeasonInfo, now?: number): NightwaveBoard;
1007
+ }
1008
+ declare module "warframe/services/wf-service/wf-service.nightwave" {
1009
+ import type { NightwaveBoard, RawSeasonInfo, WarframeResult } from "warframe/types/index";
1010
+ export function resolveNightwave(raw: RawSeasonInfo | undefined, now?: number): WarframeResult<NightwaveBoard>;
1011
+ export function getNightwave(): Promise<WarframeResult<NightwaveBoard>>;
860
1012
  }
861
1013
  declare module "warframe/data/wf/relics" {
862
1014
  import type { Relic } from "warframe/types/index";
863
1015
  export const relics: Record<string, Relic>;
864
1016
  }
1017
+ declare module "warframe/services/wf-service/wf-service.relic" {
1018
+ import type { Relic, WarframeResult } from "warframe/types/index";
1019
+ export function getRelic(input: string): Promise<WarframeResult<Relic>>;
1020
+ }
1021
+ declare module "warframe/infrastructure/wf/riven-export-adapter" {
1022
+ import type { RivenCalculationAttribute, RivenWeaponType } from "warframe/types/wf/riven";
1023
+ import type { RivenExportDefinition } from "warframe/types/wf/riven-export";
1024
+ import type { RivenAttributeUnit } from "warframe/types/wfm";
1025
+ export const rivenDefinitionTypes: Record<string, RivenWeaponType>;
1026
+ export interface RivenCalculationStat extends RivenCalculationAttribute {
1027
+ gameRef: string;
1028
+ key: string;
1029
+ name: string;
1030
+ englishName: string;
1031
+ baseValue: number;
1032
+ unit: RivenAttributeUnit;
1033
+ spliced: boolean;
1034
+ canBeBuff: boolean;
1035
+ canBeCurse: boolean;
1036
+ verified: boolean;
1037
+ aliases: string[];
1038
+ }
1039
+ export function cleanRivenTemplate(template: string): string | undefined;
1040
+ export function adaptRivenDefinitions(definitions: RivenExportDefinition[]): Record<string, RivenCalculationStat[]>;
1041
+ }
865
1042
  declare module "warframe/data/wf/rivenBaseValues" {
866
- export const rivenAttrValueDict: Record<string, Record<string, number>>;
1043
+ export type RivenAttrValueDict = Record<string, Record<string, number>>;
1044
+ export const rivenStatsByType: Record<string, import("warframe/infrastructure/wf/riven-export-adapter").RivenCalculationStat[]>;
1045
+ export const rivenAttributes: import("warframe/infrastructure/wf/riven-export-adapter").RivenCalculationStat[];
1046
+ export const rivenAttrValueDict: RivenAttrValueDict;
867
1047
  }
868
1048
  declare module "warframe/data/wf/rivenDisposition" {
869
1049
  import type { RivenWeaponDisposition } from "warframe/types/index";
1050
+ import type { RivenExportWeapon } from "warframe/types/wf/riven-export";
1051
+ export function buildWeaponRivenDispositionDict(weapons: RivenExportWeapon[], namesZh: Record<string, string>, types: Record<string, string>): Record<string, RivenWeaponDisposition>;
870
1052
  export const weaponRivenDispositionDict: Record<string, RivenWeaponDisposition>;
871
1053
  }
872
1054
  declare module "warframe/data/wf/rivenStatData" {
873
1055
  import type { RivenStatFixFactorMap } from "warframe/types/index";
874
1056
  export const rivenStatFixFactor: RivenStatFixFactorMap;
875
1057
  }
876
- declare module "warframe/data/wf/sortie" {
877
- export function getSortieModeName(): string;
878
- export function getSortieEnemyLevels(index: number): {
879
- minLevel: number;
880
- maxLevel: number;
881
- };
882
- }
883
1058
  declare module "warframe/infrastructure/wfm-client" {
884
1059
  import type { WfmApiClient, WfmFetcher, WfmPlugin } from 'wfm-api-client';
885
1060
  /** Warframe-local: map request failures to `undefined` (not part of upstream client). */
@@ -969,23 +1144,6 @@ declare module "warframe/infrastructure/wfm-client" {
969
1144
  setAccessToken: (token: string | undefined) => void;
970
1145
  };
971
1146
  }
972
- declare module "warframe/data/wfm/globalRivenAttribute" {
973
- import type { AsyncCache, RivenAttribute } from "warframe/types/index";
974
- export function globalRivenAttributeFactory(rivenAttributeData?: RivenAttribute[]): Promise<{
975
- globalRivenAttributeList: RivenAttribute[];
976
- globalRivenAttributeDict: Record<string, RivenAttribute>;
977
- }>;
978
- export let globalRivenAttribute: AsyncCache<{
979
- globalRivenAttributeList: RivenAttribute[];
980
- globalRivenAttributeDict: Record<string, RivenAttribute>;
981
- }>;
982
- export function overrideGlobalRivenAttribute(cache: AsyncCache<{
983
- globalRivenAttributeList: RivenAttribute[];
984
- globalRivenAttributeDict: {
985
- [key: string]: RivenAttribute;
986
- };
987
- }>): void;
988
- }
989
1147
  declare module "warframe/data/wfm/globalRivenItem" {
990
1148
  import type { AsyncCache, RivenItem } from "warframe/types/index";
991
1149
  export interface GlobalRivenItemWordPrefixCandidate {
@@ -1016,58 +1174,42 @@ declare module "warframe/infrastructure/ocr-api" {
1016
1174
  import type { OcrAPISecret } from "warframe/types/index";
1017
1175
  export function extractTextFromImage(image: string | Blob, secret: OcrAPISecret): Promise<string[] | undefined>;
1018
1176
  }
1019
- declare module "warframe/infrastructure/wf/bounty-adapter" {
1020
- import type { BountyBoard, BountyLocation, BountyRewardRarity, OracleBountyCycle, RawSyndicateMission } from "warframe/types/index";
1021
- export const bountyLocationTag: Record<BountyLocation, string>;
1022
- /** Locations whose Jobs are empty in official WorldState; use browse.wf Oracle. */
1023
- export const oracleBountyLocations: Set<BountyLocation>;
1024
- /**
1025
- * Map drop probability to 铜/银/金 within one stage.
1026
- * Highest unique probability → bronze, lowest → gold, middle → silver.
1027
- * With only two buckets: highest → bronze, lower → silver.
1028
- */
1029
- export function rarityFromStageProbabilities(probability: number, uniqueSortedDesc: number[]): BountyRewardRarity;
1030
- export function resolveExportItemNameZh(sourceKey: string): string;
1031
- export function adaptBountyBoard(location: BountyLocation, mission: RawSyndicateMission | undefined): BountyBoard | undefined;
1032
- export function findRawSyndicateMission(missions: RawSyndicateMission[], location: BountyLocation): RawSyndicateMission | undefined;
1033
- export function formatOracleChallenge(challengePath: string): string;
1034
- export function adaptOracleBountyBoard(location: 'zariman' | 'cavia' | 'hex', cycle: OracleBountyCycle | undefined): BountyBoard | undefined;
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
- }
1043
- declare module "warframe/infrastructure/wf/nightwave-adapter" {
1044
- import type { NightwaveBoard, RawSeasonInfo } from "warframe/types/index";
1045
- export function adaptNightwave(raw: RawSeasonInfo, now?: number): NightwaveBoard;
1046
- }
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" {
1177
+ declare module "warframe/services/wf-service/wf-service.riven" {
1057
1178
  import type { WeeklyRiven } from 'warframe-weekly-rivens';
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";
1179
+ import type { OcrAPISecret, RivenStatAnalyzeResult, RivenStatResult, WarframeResult } from "warframe/types/index";
1180
+ import type { RivenCalculationAttribute } from "warframe/types/wf/riven";
1059
1181
  import { weaponRivenDispositionDict } from "warframe/data/wf/rivenDisposition";
1060
- export { adaptEvents, getEvents, getEventsFrom } from "warframe/services/wf-service/wf-service.event";
1061
- export function getRelic(input: string): Promise<WarframeResult<Relic>>;
1062
- export function getArbitrations(day?: number): WarframeResult<Arbitration[]>;
1063
- export function adaptArchonHunt(source: {
1064
- boss: string;
1065
- missions?: Array<{
1066
- type: string;
1067
- node?: string;
1068
- nodeKey: string;
1069
- }>;
1070
- }): Promise<ArchonHunt>;
1182
+ export function getAnalyzedRiven(secret: OcrAPISecret, url: string, variant?: string): Promise<WarframeResult<RivenStatAnalyzeResult>>;
1183
+ export function filterWeeklyRivens(data: WeeklyRiven[], minPrice: number, minPop?: number): WeeklyRiven[];
1184
+ export function getWeeklyRivens(minPrice: number): Promise<WeeklyRiven[]>;
1185
+ export function getStaticRivenStats(weaponType: string, statType: string, disposition: number): Promise<WarframeResult<RivenStatResult>>;
1186
+ export function getWeaponRivenDisposition(name: string): (typeof weaponRivenDispositionDict)[string] | undefined;
1187
+ export function parseOCRResult(ocrResult: string[]): Promise<{
1188
+ name: string;
1189
+ attributes: {
1190
+ attr: RivenCalculationAttribute;
1191
+ value: number;
1192
+ prefix: string;
1193
+ }[];
1194
+ } | undefined>;
1195
+ export function analyzeRivenStat(parseResult: {
1196
+ name: string;
1197
+ attributes: {
1198
+ attr: RivenCalculationAttribute;
1199
+ value: number;
1200
+ prefix: string;
1201
+ }[];
1202
+ }, variant?: string): WarframeResult<RivenStatAnalyzeResult>;
1203
+ }
1204
+ declare module "warframe/data/wf/sortie" {
1205
+ export function getSortieModeName(): string;
1206
+ export function getSortieEnemyLevels(index: number): {
1207
+ minLevel: number;
1208
+ maxLevel: number;
1209
+ };
1210
+ }
1211
+ declare module "warframe/services/wf-service/wf-service.sortie" {
1212
+ import type { RawSortie, Sortie, WarframeResult } from "warframe/types/index";
1071
1213
  export function adaptSortie(source: RawSortie, dates?: {
1072
1214
  activation?: Date;
1073
1215
  expiry?: Date;
@@ -1082,53 +1224,9 @@ declare module "warframe/services/wf-service/index" {
1082
1224
  sortieRaw?: RawSortie;
1083
1225
  }): Promise<WarframeResult<Sortie>>;
1084
1226
  export function getSortie(): Promise<WarframeResult<Sortie>>;
1085
- export function getWeekly(): Promise<WarframeResult<{
1086
- archonHunt: ArchonHunt;
1087
- deepArchimedea: ArchiMedea;
1088
- temporalArchimedea: ArchiMedea;
1089
- }>>;
1090
- export function resolveNightwave(raw: RawSeasonInfo | undefined, now?: number): WarframeResult<NightwaveBoard>;
1091
- export function getNightwave(): Promise<WarframeResult<NightwaveBoard>>;
1092
- export function getEnvironment(): Promise<string>;
1093
- export function getBounty(location: BountyLocation): Promise<WarframeResult<BountyBoard>>;
1094
- export function getCircuitWeek(): {
1095
- currentIncarnons: number;
1096
- currentWarframes: number;
1097
- allIncarnons: string[][];
1098
- allWarframes: string[][];
1099
- };
1100
- export function adaptInvasions(rawInvasions: RawInvasion[]): Promise<InvasionBoard>;
1101
- export function getInvasionsFrom(snapshot?: {
1102
- raw?: unknown;
1103
- invasionsRaw?: RawInvasion[];
1104
- }): Promise<WarframeResult<InvasionBoard>>;
1105
- export function getInvasions(): Promise<WarframeResult<InvasionBoard>>;
1106
- export function adaptAlerts(alerts?: readonly {
1107
- expiry?: Date;
1108
- mission?: {
1109
- nodeKey?: string;
1110
- typeKey?: string;
1111
- minEnemyLevel?: number;
1112
- maxEnemyLevel?: number;
1113
- nightmare?: boolean;
1114
- reward?: {
1115
- items?: string[];
1116
- countedItems?: Array<{
1117
- type?: string;
1118
- key?: string;
1119
- count?: number;
1120
- }>;
1121
- credits?: number;
1122
- };
1123
- };
1124
- }[], now?: number): Promise<AlertBoard>;
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>>;
1227
+ }
1228
+ declare module "warframe/services/wf-service/wf-service.steel-essence" {
1229
+ import type { RawSteelPathOfferings, SteelEssenceBoard, WarframeResult } from "warframe/types/index";
1132
1230
  export function adaptSteelEssence(raw?: RawSteelPathOfferings, now?: number): Promise<SteelEssenceBoard>;
1133
1231
  export function getSteelEssenceFrom(snapshot?: {
1134
1232
  raw?: {
@@ -1136,31 +1234,51 @@ declare module "warframe/services/wf-service/index" {
1136
1234
  };
1137
1235
  }, now?: number): Promise<WarframeResult<SteelEssenceBoard>>;
1138
1236
  export function getSteelEssence(): Promise<WarframeResult<SteelEssenceBoard>>;
1139
- export function getFissures(): Promise<WarframeResult<Fissure[]>>;
1140
- export function getSteelPathFissures(): Promise<WarframeResult<Fissure[]>>;
1141
- export function getRailjackFissures(): Promise<WarframeResult<Fissure[]>>;
1142
- export function getAnalyzedRiven(secret: OcrAPISecret, url: string): Promise<WarframeResult<RivenStatAnalyzeResult>>;
1237
+ }
1238
+ declare module "warframe/services/wf-service/wf-service.void-trader" {
1239
+ import type { VoidTrader, WarframeResult } from "warframe/types/index";
1143
1240
  export function getVoidTrader(): Promise<WarframeResult<VoidTrader>>;
1144
- export function filterWeeklyRivens(data: WeeklyRiven[], minPrice: number, minPop?: number): WeeklyRiven[];
1145
- export function getWeeklyRivens(minPrice: number): Promise<WeeklyRiven[]>;
1146
- export function getStaticRivenStats(weaponType: string, statType: string, disposition: number): Promise<WarframeResult<RivenStatResult>>;
1147
- export function getWeaponRivenDisposition(name: string): (typeof weaponRivenDispositionDict)[string] | undefined;
1148
- export function parseOCRResult(ocrResult: string[]): Promise<{
1149
- name: string;
1150
- attributes: {
1151
- attr: RivenAttribute;
1152
- value: number;
1153
- prefix: string;
1154
- }[];
1155
- } | undefined>;
1156
- export function analyzeRivenStat(parseResult: {
1157
- name: string;
1158
- attributes: {
1159
- attr: RivenAttribute;
1160
- value: number;
1161
- prefix: string;
1162
- }[];
1163
- }): WarframeResult<RivenStatAnalyzeResult>;
1241
+ }
1242
+ declare module "warframe/data/wf/archonHunt" {
1243
+ export function getArchonHuntModeName(): string;
1244
+ export function getArchonHuntEnemyLevels(index: number): {
1245
+ minLevel: number;
1246
+ maxLevel: number;
1247
+ };
1248
+ }
1249
+ declare module "warframe/services/wf-service/wf-service.weekly" {
1250
+ import type { ArchiMedea, ArchonHunt, WarframeResult } from "warframe/types/index";
1251
+ export function adaptArchonHunt(source: {
1252
+ boss: string;
1253
+ missions?: Array<{
1254
+ type: string;
1255
+ node?: string;
1256
+ nodeKey: string;
1257
+ }>;
1258
+ }): Promise<ArchonHunt>;
1259
+ export function getWeekly(): Promise<WarframeResult<{
1260
+ archonHunt: ArchonHunt;
1261
+ deepArchimedea: ArchiMedea;
1262
+ temporalArchimedea: ArchiMedea;
1263
+ }>>;
1264
+ }
1265
+ declare module "warframe/services/wf-service/index" {
1266
+ export { adaptAlerts, getAlerts } from "warframe/services/wf-service/wf-service.alert";
1267
+ export { getArbitrations } from "warframe/services/wf-service/wf-service.arbitration";
1268
+ export { getBounty } from "warframe/services/wf-service/wf-service.bounty";
1269
+ export { adaptCalendar, getCalendar, getCalendarFrom } from "warframe/services/wf-service/wf-service.calendar";
1270
+ export { getCircuitWeek } from "warframe/services/wf-service/wf-service.circuit";
1271
+ export { getEnvironment } from "warframe/services/wf-service/wf-service.environment";
1272
+ export { adaptEvents, getEvents, getEventsFrom } from "warframe/services/wf-service/wf-service.event";
1273
+ export { getFissures, getRailjackFissures, getSteelPathFissures, } from "warframe/services/wf-service/wf-service.fissure";
1274
+ export { adaptInvasions, getInvasions, getInvasionsFrom } from "warframe/services/wf-service/wf-service.invasion";
1275
+ export { getNightwave, resolveNightwave } from "warframe/services/wf-service/wf-service.nightwave";
1276
+ export { getRelic } from "warframe/services/wf-service/wf-service.relic";
1277
+ export { analyzeRivenStat, filterWeeklyRivens, getAnalyzedRiven, getStaticRivenStats, getWeaponRivenDisposition, getWeeklyRivens, parseOCRResult, } from "warframe/services/wf-service/wf-service.riven";
1278
+ export { adaptSortie, getSortie, getSortieFrom } from "warframe/services/wf-service/wf-service.sortie";
1279
+ export { adaptSteelEssence, getSteelEssence, getSteelEssenceFrom, } from "warframe/services/wf-service/wf-service.steel-essence";
1280
+ export { getVoidTrader } from "warframe/services/wf-service/wf-service.void-trader";
1281
+ export { adaptArchonHunt, getWeekly } from "warframe/services/wf-service/wf-service.weekly";
1164
1282
  }
1165
1283
  declare module "warframe/data/wfm/globalItem" {
1166
1284
  import type { AsyncCache, ItemShort } from "warframe/types/index";
@@ -1239,9 +1357,31 @@ declare module "warframe/services/wfm-service/wfm-service.item-matcher" {
1239
1357
  }
1240
1358
  declare module "warframe/data/wfm/globalDucatnator" {
1241
1359
  import type { AsyncCache, Ducatnator } from "warframe/types/index";
1360
+ interface DucatnatorSnapshot {
1361
+ hour: Ducatnator[];
1362
+ day?: Ducatnator[];
1363
+ }
1364
+ export function globalDucatnatorIDDictFactory(data?: DucatnatorSnapshot): Promise<Record<string, Ducatnator> | undefined>;
1242
1365
  export let globalDucatnatorIDDict: AsyncCache<Record<string, Ducatnator> | undefined>;
1243
1366
  export function overrideGlobalDucatnatorIDDict(cache: AsyncCache<Record<string, Ducatnator> | undefined>): void;
1244
1367
  }
1368
+ declare module "warframe/data/wfm/globalRivenAttribute" {
1369
+ import type { AsyncCache, RivenAttribute } from "warframe/types/index";
1370
+ export function globalRivenAttributeFactory(rivenAttributeData?: RivenAttribute[]): Promise<{
1371
+ globalRivenAttributeList: RivenAttribute[];
1372
+ globalRivenAttributeDict: Record<string, RivenAttribute>;
1373
+ }>;
1374
+ export let globalRivenAttribute: AsyncCache<{
1375
+ globalRivenAttributeList: RivenAttribute[];
1376
+ globalRivenAttributeDict: Record<string, RivenAttribute>;
1377
+ }>;
1378
+ export function overrideGlobalRivenAttribute(cache: AsyncCache<{
1379
+ globalRivenAttributeList: RivenAttribute[];
1380
+ globalRivenAttributeDict: {
1381
+ [key: string]: RivenAttribute;
1382
+ };
1383
+ }>): void;
1384
+ }
1245
1385
  declare module "warframe/services/wfm-service/wfm-service.riven-item-matcher" {
1246
1386
  import type { GlobalRivenItemWordPrefixCandidate } from "warframe/data/wfm/globalRivenItem";
1247
1387
  import type { RivenItem } from "warframe/types/index";
@@ -1283,9 +1423,9 @@ declare module "warframe/services/wfm-service/index" {
1283
1423
  export const primedModHistory: import("warframe").AsyncCache<PrimedModHistoryItem[]>;
1284
1424
  }
1285
1425
  declare module "warframe/services/world-state-refresh" {
1426
+ import type { GlobalWorldStateData } from "warframe/data/wf/globalWorldState";
1286
1427
  import type { VoidTraderItem, WFRegionShort } from "warframe/types/index";
1287
- import { globalWorldState } from "warframe/data/wf/globalWorldState";
1288
- export type WorldStateSnapshot = Awaited<ReturnType<typeof globalWorldState.get>>;
1428
+ export type WorldStateSnapshot = GlobalWorldStateData;
1289
1429
  export type WorldStateNotification = {
1290
1430
  type: 'fissure';
1291
1431
  id: string;
@@ -1364,6 +1504,9 @@ declare module "i18n" {
1364
1504
  readonly 'riven.dispositionError': "裂罅倾向错误";
1365
1505
  readonly 'riven.weaponTypeError': "武器类型错误";
1366
1506
  readonly 'riven.statTypeError': "词条类型错误";
1507
+ readonly 'riven.unverifiedStat': "{stat}的显示换算尚未确认,暂不提供数值分析。";
1508
+ readonly 'riven.variantRequired': "组合枪的主副武器倾向不同,请使用 riven -v primary 或 riven -v secondary 指定形态。";
1509
+ readonly 'riven.variantError': "组合枪形态应为 primary(主武器)或 secondary(副武器)。";
1367
1510
  readonly 'riven.invalidParams': "请输入正确参数";
1368
1511
  readonly 'riven.noWeeklyData': "没有找到符合条件的紫卡参考数据";
1369
1512
  readonly 'wfm.inputItemName': "请输入物品名称";
@@ -1451,7 +1594,9 @@ declare module "commands/wf" {
1451
1594
  steelPathFissureCommand: (_action: Argv) => Promise<string>;
1452
1595
  railjackFissureCommand: (_action: Argv) => Promise<string>;
1453
1596
  relicCommand: (_action: Argv, input: string) => Promise<string>;
1454
- rivenCommand: (_action: Argv, input: Dict) => Promise<string>;
1597
+ rivenCommand: (_action: Argv<never, never, unknown[], {
1598
+ variant?: string;
1599
+ }>, input: Dict) => Promise<string>;
1455
1600
  rivenStatCommand: (_action: Argv, weaponType: string, statType: string, disposition: number) => Promise<string>;
1456
1601
  weeklyCommand: (_action: Argv) => Promise<string>;
1457
1602
  nightwaveCommand: (_action: Argv) => Promise<string>;