koishi-plugin-warframe 1.7.11 → 1.8.1
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 +117 -4
- package/lib/index.js +595 -19
- package/lib/index.tsbuildinfo +1 -1
- package/package.json +3 -3
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", "voidTrader.drifting", "voidTrader.arriving", "riven.imageFetchFailed", "riven.imageParseFailed", "riven.weaponNotFound", "riven.dispositionError", "riven.weaponTypeError", "riven.statTypeError", "wfm.inputItemName", "wfm.itemNotFound", "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", "voidTrader.drifting", "voidTrader.arriving", "riven.imageFetchFailed", "riven.imageParseFailed", "riven.weaponNotFound", "riven.dispositionError", "riven.weaponTypeError", "riven.statTypeError", "wfm.inputItemName", "wfm.itemNotFound", "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 {
|
|
@@ -92,6 +92,81 @@ declare module "warframe/types/wf/arbitration" {
|
|
|
92
92
|
rewards: number;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
+
declare module "warframe/types/wf/bounty" {
|
|
96
|
+
export type BountyLocation = 'cetus' | 'fortuna' | 'deimos' | 'zariman' | 'cavia' | 'hex';
|
|
97
|
+
/** 掉落稀有度:probability 同阶段内最高→铜,中间→银,最低→金 */
|
|
98
|
+
export type BountyRewardRarity = 'bronze' | 'silver' | 'gold';
|
|
99
|
+
export type BountyStandingUnit = 'standing' | 'vq';
|
|
100
|
+
export interface RawSyndicateJob {
|
|
101
|
+
jobType?: string;
|
|
102
|
+
rewards: string;
|
|
103
|
+
masteryReq?: number;
|
|
104
|
+
minEnemyLevel: number;
|
|
105
|
+
maxEnemyLevel: number;
|
|
106
|
+
xpAmounts: number[];
|
|
107
|
+
isVault?: boolean;
|
|
108
|
+
locationTag?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface RawSyndicateMission {
|
|
111
|
+
Tag: string;
|
|
112
|
+
Activation?: {
|
|
113
|
+
$date?: {
|
|
114
|
+
$numberLong?: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
Expiry?: {
|
|
118
|
+
$date?: {
|
|
119
|
+
$numberLong?: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
Jobs?: RawSyndicateJob[];
|
|
123
|
+
}
|
|
124
|
+
/** browse.wf Oracle `/bounty-cycle` response */
|
|
125
|
+
export interface OracleBountyEntry {
|
|
126
|
+
node: string;
|
|
127
|
+
challenge: string;
|
|
128
|
+
ally?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface OracleBountyCycle {
|
|
131
|
+
expiry: number;
|
|
132
|
+
rot: string;
|
|
133
|
+
vaultRot: string;
|
|
134
|
+
zarimanFaction: string;
|
|
135
|
+
bounties: Record<string, OracleBountyEntry[]>;
|
|
136
|
+
}
|
|
137
|
+
export interface BountyReward {
|
|
138
|
+
name: string;
|
|
139
|
+
rarity: BountyRewardRarity;
|
|
140
|
+
}
|
|
141
|
+
export interface BountyJob {
|
|
142
|
+
name: string;
|
|
143
|
+
enemyLevels: [number, number];
|
|
144
|
+
standingStages: number[];
|
|
145
|
+
minMR: number;
|
|
146
|
+
isVault?: boolean;
|
|
147
|
+
locationTag?: string;
|
|
148
|
+
isNarmer?: boolean;
|
|
149
|
+
/** 各阶段奖励池(对应 ExportRewards 的各层);Oracle 赏金无此信息 */
|
|
150
|
+
stages: BountyReward[][];
|
|
151
|
+
/** Oracle 挑战描述 */
|
|
152
|
+
challenge?: string;
|
|
153
|
+
/** Hex 盟友显示名 */
|
|
154
|
+
ally?: string;
|
|
155
|
+
/** 声望单位:扎里曼为虚空余烬(VQ) */
|
|
156
|
+
standingUnit?: BountyStandingUnit;
|
|
157
|
+
}
|
|
158
|
+
export interface BountyBoard {
|
|
159
|
+
location: BountyLocation;
|
|
160
|
+
title: string;
|
|
161
|
+
expiry: number;
|
|
162
|
+
jobs: BountyJob[];
|
|
163
|
+
/** worldstate Jobs vs browse.wf Oracle */
|
|
164
|
+
source?: 'worldstate' | 'oracle';
|
|
165
|
+
rotation?: string;
|
|
166
|
+
vaultRotation?: string;
|
|
167
|
+
zarimanFaction?: string;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
95
170
|
declare module "warframe/types/wf/fissure" {
|
|
96
171
|
import type { WFRegionShort } from "warframe/types/wf/region";
|
|
97
172
|
export interface Fissure {
|
|
@@ -272,6 +347,7 @@ declare module "warframe/types/index" {
|
|
|
272
347
|
export type { OcrAPISecret } from "warframe/types/ocr";
|
|
273
348
|
export type { WarframeError, WarframeErrorCode, WarframeErrorParams, WarframeFailure, WarframeResult, } from "warframe/types/warframe-result";
|
|
274
349
|
export type { Arbitration, ArbitrationShort } from "warframe/types/wf/arbitration";
|
|
350
|
+
export type { BountyBoard, BountyJob, BountyLocation, BountyReward, BountyRewardRarity, BountyStandingUnit, OracleBountyCycle, OracleBountyEntry, RawSyndicateJob, RawSyndicateMission, } from "warframe/types/wf/bounty";
|
|
275
351
|
export type { Fissure } from "warframe/types/wf/fissure";
|
|
276
352
|
export type { WFRegion, WFRegionShort } from "warframe/types/wf/region";
|
|
277
353
|
export type { ExternalRelic, ExternalRelicReward, OutputRelic, OutputRelicReward, Relic, RelicQuality, RelicReward, RelicRewardRarity, RelicTier, } from "warframe/types/wf/relic";
|
|
@@ -378,6 +454,11 @@ declare module "warframe/data/wf/arbitrationSchedule" {
|
|
|
378
454
|
}
|
|
379
455
|
declare module "warframe/infrastructure/wf/wf-api" {
|
|
380
456
|
import type WorldState from 'warframe-worldstate-parser';
|
|
457
|
+
import type { OracleBountyCycle, RawSyndicateMission } from "warframe/types/index";
|
|
458
|
+
export function extractSyndicateMissionsRaw(json: string): RawSyndicateMission[];
|
|
459
|
+
export function fetchWorldStateJson(): Promise<string | undefined>;
|
|
460
|
+
/** browse.wf Oracle bounty cycle (Zariman / Cavia / Hex). */
|
|
461
|
+
export function fetchOracleBountyCycle(): Promise<OracleBountyCycle | undefined>;
|
|
381
462
|
export function getWorldState(json?: string): Promise<WorldState>;
|
|
382
463
|
export function getVoidTraderHistory(data?: string): Promise<VoidTraderData | undefined>;
|
|
383
464
|
interface VoidTraderItem {
|
|
@@ -395,6 +476,11 @@ declare module "warframe/infrastructure/wf/wf-api" {
|
|
|
395
476
|
[itemName: string]: VoidTraderItem;
|
|
396
477
|
}
|
|
397
478
|
}
|
|
479
|
+
declare module "warframe/data/wf/globalOracleBountyCycle" {
|
|
480
|
+
import type { AsyncCache, OracleBountyCycle } from "warframe/types/index";
|
|
481
|
+
export let globalOracleBountyCycle: AsyncCache<OracleBountyCycle | undefined>;
|
|
482
|
+
export function overrideGlobalOracleBountyCycle(cache: AsyncCache<OracleBountyCycle | undefined>): void;
|
|
483
|
+
}
|
|
398
484
|
declare module "warframe/infrastructure/wf/wf-export-adapter" {
|
|
399
485
|
import type { IRegion } from 'warframe-public-export-plus';
|
|
400
486
|
import type { RelicQuality, WFRegionShort } from "warframe/types/index";
|
|
@@ -440,11 +526,12 @@ declare module "warframe/infrastructure/wf/wfcd-adapter" {
|
|
|
440
526
|
}
|
|
441
527
|
declare module "warframe/data/wf/globalWorldState" {
|
|
442
528
|
import type WorldState from 'warframe-worldstate-parser';
|
|
443
|
-
import type { Fissure } from "warframe/types/index";
|
|
529
|
+
import type { Fissure, RawSyndicateMission } from "warframe/types/index";
|
|
444
530
|
type ParsedFissure = WorldState['fissures'][number];
|
|
445
531
|
export function adaptFissure(fissure: ParsedFissure): Promise<Fissure>;
|
|
446
532
|
export const globalWorldState: import("warframe").AsyncCache<{
|
|
447
533
|
raw: WorldState;
|
|
534
|
+
syndicateMissionsRaw: RawSyndicateMission[];
|
|
448
535
|
fissures: Fissure[];
|
|
449
536
|
spFissures: Fissure[];
|
|
450
537
|
rjFissures: Fissure[];
|
|
@@ -601,9 +688,26 @@ declare module "warframe/infrastructure/ocr-api" {
|
|
|
601
688
|
import type { OcrAPISecret } from "warframe/types/index";
|
|
602
689
|
export function extractTextFromImage(image: string | Blob, secret: OcrAPISecret): Promise<string[] | undefined>;
|
|
603
690
|
}
|
|
691
|
+
declare module "warframe/infrastructure/wf/bounty-adapter" {
|
|
692
|
+
import type { BountyBoard, BountyLocation, BountyRewardRarity, OracleBountyCycle, RawSyndicateMission } from "warframe/types/index";
|
|
693
|
+
export const bountyLocationTag: Record<BountyLocation, string>;
|
|
694
|
+
/** Locations whose Jobs are empty in official WorldState; use browse.wf Oracle. */
|
|
695
|
+
export const oracleBountyLocations: Set<BountyLocation>;
|
|
696
|
+
/**
|
|
697
|
+
* Map drop probability to 铜/银/金 within one stage.
|
|
698
|
+
* Highest unique probability → bronze, lowest → gold, middle → silver.
|
|
699
|
+
* With only two buckets: highest → bronze, lower → silver.
|
|
700
|
+
*/
|
|
701
|
+
export function rarityFromStageProbabilities(probability: number, uniqueSortedDesc: number[]): BountyRewardRarity;
|
|
702
|
+
export function resolveExportItemNameZh(sourceKey: string): string;
|
|
703
|
+
export function adaptBountyBoard(location: BountyLocation, mission: RawSyndicateMission | undefined): BountyBoard | undefined;
|
|
704
|
+
export function findRawSyndicateMission(missions: RawSyndicateMission[], location: BountyLocation): RawSyndicateMission | undefined;
|
|
705
|
+
export function formatOracleChallenge(challengePath: string): string;
|
|
706
|
+
export function adaptOracleBountyBoard(location: 'zariman' | 'cavia' | 'hex', cycle: OracleBountyCycle | undefined): BountyBoard | undefined;
|
|
707
|
+
}
|
|
604
708
|
declare module "warframe/services/wf-service" {
|
|
605
709
|
import type { WeeklyRiven } from 'warframe-weekly-rivens';
|
|
606
|
-
import type { Arbitration, ArchiMedea, ArchonHunt, Fissure, OcrAPISecret, Relic, RivenAttribute, RivenStatAnalyzeResult, RivenStatResult, VoidTrader, WarframeResult } from "warframe/types/index";
|
|
710
|
+
import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, BountyLocation, Fissure, OcrAPISecret, Relic, RivenAttribute, RivenStatAnalyzeResult, RivenStatResult, VoidTrader, WarframeResult } from "warframe/types/index";
|
|
607
711
|
import { weaponRivenDispositionDict } from "warframe/data/wf/rivenDisposition";
|
|
608
712
|
export function getRelic(input: string): Promise<WarframeResult<Relic>>;
|
|
609
713
|
export function getArbitrations(day?: number): WarframeResult<Arbitration[]>;
|
|
@@ -613,6 +717,7 @@ declare module "warframe/services/wf-service" {
|
|
|
613
717
|
temporalArchimedea: ArchiMedea;
|
|
614
718
|
}>>;
|
|
615
719
|
export function getEnvironment(): Promise<string>;
|
|
720
|
+
export function getBounty(location: BountyLocation): Promise<WarframeResult<BountyBoard>>;
|
|
616
721
|
export function getCircuitWeek(): {
|
|
617
722
|
currentIncarnons: number;
|
|
618
723
|
currentWarframes: number;
|
|
@@ -827,6 +932,7 @@ declare module "i18n" {
|
|
|
827
932
|
readonly 'relic.dataLoading': "遗物数据未加载完成,请稍后再试";
|
|
828
933
|
readonly 'relic.notFound': "未找到对应遗物信息";
|
|
829
934
|
readonly 'arbitration.invalidDayRange': "天数需小于等于14且大于0";
|
|
935
|
+
readonly 'bounty.unavailable': "当前该地点暂无可用赏金";
|
|
830
936
|
readonly 'voidTrader.drifting': "虚空商人仍在未知地带漂流...";
|
|
831
937
|
readonly 'voidTrader.arriving': "距离虚空商人到达还有: {time}";
|
|
832
938
|
readonly 'riven.imageNotFound': "未检测到图片";
|
|
@@ -888,10 +994,11 @@ declare module "utils/index" {
|
|
|
888
994
|
declare module "components/wf" {
|
|
889
995
|
import type { Element } from 'koishi';
|
|
890
996
|
import type { WeeklyRiven } from 'warframe-weekly-rivens';
|
|
891
|
-
import type { Arbitration, ArchiMedea, ArchonHunt, Fissure, OutputRelic, RivenStatAnalyzeResult, RivenStatResult, VoidTrader } from "warframe/index";
|
|
997
|
+
import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, Fissure, OutputRelic, RivenStatAnalyzeResult, RivenStatResult, VoidTrader } from "warframe/index";
|
|
892
998
|
export function ArbitrationComponent(arbi: Arbitration[]): Element;
|
|
893
999
|
export function CircuitComponent(currentIncarnons: number, currentWarframes: number, allIncarnons: string[][], allWarframes: string[][]): Element;
|
|
894
1000
|
export function FissureComponent(fissures: Fissure[], type: 'fissure' | 'sp-fissure' | 'rj-fissure'): Element;
|
|
1001
|
+
export function BountyComponent(board: BountyBoard): Element;
|
|
895
1002
|
export function WeeklyRivenComponent(items: WeeklyRiven[], minPrice: number): Element;
|
|
896
1003
|
export function WeeklyComponent(archon: ArchonHunt, deepArchimedea: ArchiMedea, temporalArchimedea: ArchiMedea): Element;
|
|
897
1004
|
export function RelicComponent(relic: OutputRelic): Element;
|
|
@@ -915,6 +1022,12 @@ declare module "commands/wf" {
|
|
|
915
1022
|
weeklyCommand: (_action: Argv) => Promise<string>;
|
|
916
1023
|
weeklyRivenCommand: (_action: Argv, minPrice?: number) => Promise<string>;
|
|
917
1024
|
environmentCommand: () => Promise<string>;
|
|
1025
|
+
bountyCetusCommand: () => Promise<string>;
|
|
1026
|
+
bountyFortunaCommand: () => Promise<string>;
|
|
1027
|
+
bountyDeimosCommand: () => Promise<string>;
|
|
1028
|
+
bountyZarimanCommand: () => Promise<string>;
|
|
1029
|
+
bountyCaviaCommand: () => Promise<string>;
|
|
1030
|
+
bountyHexCommand: () => Promise<string>;
|
|
918
1031
|
};
|
|
919
1032
|
}
|
|
920
1033
|
declare module "components/render" {
|