koishi-plugin-warframe 1.8.8 → 1.10.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 +119 -5
- package/lib/index.js +416 -56
- package/lib/index.tsbuildinfo +1 -1
- package/package.json +1 -1
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", "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 {
|
|
@@ -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';
|
|
@@ -305,6 +342,41 @@ declare module "warframe/types/wf/riven" {
|
|
|
305
342
|
}> | undefined;
|
|
306
343
|
}
|
|
307
344
|
}
|
|
345
|
+
declare module "warframe/types/wf/sortie" {
|
|
346
|
+
import type { WFRegionShort } from "warframe/types/wf/region";
|
|
347
|
+
export interface RawSortieVariant {
|
|
348
|
+
missionType?: string;
|
|
349
|
+
modifierType?: string;
|
|
350
|
+
node?: string;
|
|
351
|
+
}
|
|
352
|
+
export interface RawSortie {
|
|
353
|
+
Boss?: string;
|
|
354
|
+
Variants?: RawSortieVariant[];
|
|
355
|
+
Activation?: {
|
|
356
|
+
$date?: {
|
|
357
|
+
$numberLong?: string;
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
Expiry?: {
|
|
361
|
+
$date?: {
|
|
362
|
+
$numberLong?: string;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
export interface SortieMission {
|
|
367
|
+
type: string;
|
|
368
|
+
node: WFRegionShort;
|
|
369
|
+
modifier: string;
|
|
370
|
+
}
|
|
371
|
+
export interface Sortie {
|
|
372
|
+
modeName: string;
|
|
373
|
+
boss: string;
|
|
374
|
+
faction: string;
|
|
375
|
+
expiry: number;
|
|
376
|
+
remaining: string;
|
|
377
|
+
missions: SortieMission[];
|
|
378
|
+
}
|
|
379
|
+
}
|
|
308
380
|
declare module "warframe/types/wf/voidtrader" {
|
|
309
381
|
export interface VoidTrader {
|
|
310
382
|
expiry: string;
|
|
@@ -350,9 +422,11 @@ declare module "warframe/types/index" {
|
|
|
350
422
|
export type { Arbitration, ArbitrationShort } from "warframe/types/wf/arbitration";
|
|
351
423
|
export type { BountyBoard, BountyJob, BountyLocation, BountyReward, BountyRewardRarity, BountyStandingUnit, OracleBountyCycle, OracleBountyEntry, RawSyndicateJob, RawSyndicateMission, } from "warframe/types/wf/bounty";
|
|
352
424
|
export type { Fissure } from "warframe/types/wf/fissure";
|
|
425
|
+
export type { NightwaveBoard, NightwaveChallengeInfo, NightwaveChallengeKind, RawMongoDate, RawNightwaveActiveChallenge, RawSeasonInfo, } from "warframe/types/wf/nightwave";
|
|
353
426
|
export type { WFRegion, WFRegionShort } from "warframe/types/wf/region";
|
|
354
427
|
export type { ExternalRelic, ExternalRelicReward, OutputRelic, OutputRelicReward, Relic, RelicQuality, RelicReward, RelicRewardRarity, RelicTier, } from "warframe/types/wf/relic";
|
|
355
428
|
export type { RivenStatAnalyzeResult, RivenStatAnalyzsis, RivenStatCountType, RivenStatFixFactor, RivenStatFixFactorMap, RivenStatResult, RivenWeaponDisposition, RivenWeaponType, } from "warframe/types/wf/riven";
|
|
429
|
+
export type { RawSortie, RawSortieVariant, Sortie, SortieMission, } from "warframe/types/wf/sortie";
|
|
356
430
|
export type { VoidTrader, VoidTraderItem } from "warframe/types/wf/voidtrader";
|
|
357
431
|
export type { ArchiMedea, ArchiMedeaDebuff, ArchiMedeaMission, ArchonHunt, ArchonHuntMissions, } from "warframe/types/wf/weekly";
|
|
358
432
|
export type { ClosedStatisticsEntry, Ducatnator, ItemShort, ItemStatisticsPoint, ItemStatisticsSummary, LiveStatisticsEntry, OrderWithUser, PrimedModHistoryItem, RivenAttribute, RivenAttributeShortInternal, RivenAttributeUnit, RivenItem, RivenOrder, RivenOrderInternal, StatisticsCollection, WFMLang, } from "warframe/types/wfm";
|
|
@@ -462,8 +536,10 @@ declare module "warframe/data/wf/archonHunt" {
|
|
|
462
536
|
}
|
|
463
537
|
declare module "warframe/infrastructure/wf/wf-api" {
|
|
464
538
|
import type WorldState from 'warframe-worldstate-parser';
|
|
465
|
-
import type { OracleBountyCycle, RawSyndicateMission } from "warframe/types/index";
|
|
539
|
+
import type { OracleBountyCycle, RawSeasonInfo, RawSortie, RawSyndicateMission } from "warframe/types/index";
|
|
466
540
|
export function extractSyndicateMissionsRaw(json: string): RawSyndicateMission[];
|
|
541
|
+
export function extractSeasonInfoRaw(json: string): RawSeasonInfo | undefined;
|
|
542
|
+
export function extractSortieRaw(json: string): RawSortie | undefined;
|
|
467
543
|
export function fetchWorldStateJson(): Promise<string | undefined>;
|
|
468
544
|
/** browse.wf Oracle bounty cycle (Zariman / Cavia / Hex). */
|
|
469
545
|
export function fetchOracleBountyCycle(): Promise<OracleBountyCycle | undefined>;
|
|
@@ -525,6 +601,9 @@ declare module "warframe/infrastructure/wf/wfcd-adapter" {
|
|
|
525
601
|
7: string;
|
|
526
602
|
};
|
|
527
603
|
export function fissureTierNumToNumber(a: number | string): number;
|
|
604
|
+
export function translateSortieBoss(key: string): Promise<string>;
|
|
605
|
+
export function translateSortieFaction(key: string): Promise<string>;
|
|
606
|
+
export function translateSortieModifier(key: string): Promise<string>;
|
|
528
607
|
export function getVoidTraderItem(i: {
|
|
529
608
|
item: string;
|
|
530
609
|
uniqueName: string;
|
|
@@ -534,12 +613,14 @@ declare module "warframe/infrastructure/wf/wfcd-adapter" {
|
|
|
534
613
|
}
|
|
535
614
|
declare module "warframe/data/wf/globalWorldState" {
|
|
536
615
|
import type WorldState from 'warframe-worldstate-parser';
|
|
537
|
-
import type { Fissure, RawSyndicateMission } from "warframe/types/index";
|
|
616
|
+
import type { Fissure, RawSeasonInfo, RawSyndicateMission } from "warframe/types/index";
|
|
538
617
|
type ParsedFissure = WorldState['fissures'][number];
|
|
539
618
|
export function adaptFissure(fissure: ParsedFissure): Promise<Fissure>;
|
|
540
619
|
export const globalWorldState: import("warframe").AsyncCache<{
|
|
541
620
|
raw: WorldState;
|
|
542
621
|
syndicateMissionsRaw: RawSyndicateMission[];
|
|
622
|
+
seasonInfoRaw: RawSeasonInfo | undefined;
|
|
623
|
+
sortieRaw: import("warframe").RawSortie | undefined;
|
|
543
624
|
fissures: Fissure[];
|
|
544
625
|
spFissures: Fissure[];
|
|
545
626
|
rjFissures: Fissure[];
|
|
@@ -560,6 +641,13 @@ declare module "warframe/data/wf/rivenStatData" {
|
|
|
560
641
|
import type { RivenStatFixFactorMap } from "warframe/types/index";
|
|
561
642
|
export const rivenStatFixFactor: RivenStatFixFactorMap;
|
|
562
643
|
}
|
|
644
|
+
declare module "warframe/data/wf/sortie" {
|
|
645
|
+
export function getSortieModeName(): string;
|
|
646
|
+
export function getSortieEnemyLevels(index: number): {
|
|
647
|
+
minLevel: number;
|
|
648
|
+
maxLevel: number;
|
|
649
|
+
};
|
|
650
|
+
}
|
|
563
651
|
declare module "warframe/infrastructure/wfm-client" {
|
|
564
652
|
import type { WfmApiClient, WfmFetcher, WfmPlugin } from 'wfm-api-client';
|
|
565
653
|
/** Warframe-local: map request failures to `undefined` (not part of upstream client). */
|
|
@@ -713,9 +801,13 @@ declare module "warframe/infrastructure/wf/bounty-adapter" {
|
|
|
713
801
|
export function formatOracleChallenge(challengePath: string): string;
|
|
714
802
|
export function adaptOracleBountyBoard(location: 'zariman' | 'cavia' | 'hex', cycle: OracleBountyCycle | undefined): BountyBoard | undefined;
|
|
715
803
|
}
|
|
804
|
+
declare module "warframe/infrastructure/wf/nightwave-adapter" {
|
|
805
|
+
import type { NightwaveBoard, RawSeasonInfo } from "warframe/types/index";
|
|
806
|
+
export function adaptNightwave(raw: RawSeasonInfo, now?: number): NightwaveBoard;
|
|
807
|
+
}
|
|
716
808
|
declare module "warframe/services/wf-service" {
|
|
717
809
|
import type { WeeklyRiven } from 'warframe-weekly-rivens';
|
|
718
|
-
import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, BountyLocation, Fissure, OcrAPISecret, Relic, RivenAttribute, RivenStatAnalyzeResult, RivenStatResult, VoidTrader, WarframeResult } from "warframe/types/index";
|
|
810
|
+
import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, BountyLocation, Fissure, NightwaveBoard, OcrAPISecret, RawSeasonInfo, RawSortie, Relic, RivenAttribute, RivenStatAnalyzeResult, RivenStatResult, Sortie, VoidTrader, WarframeResult } from "warframe/types/index";
|
|
719
811
|
import { weaponRivenDispositionDict } from "warframe/data/wf/rivenDisposition";
|
|
720
812
|
export function getRelic(input: string): Promise<WarframeResult<Relic>>;
|
|
721
813
|
export function getArbitrations(day?: number): WarframeResult<Arbitration[]>;
|
|
@@ -727,11 +819,27 @@ declare module "warframe/services/wf-service" {
|
|
|
727
819
|
nodeKey: string;
|
|
728
820
|
}>;
|
|
729
821
|
}): Promise<ArchonHunt>;
|
|
822
|
+
export function adaptSortie(source: RawSortie, dates?: {
|
|
823
|
+
activation?: Date;
|
|
824
|
+
expiry?: Date;
|
|
825
|
+
}): Promise<Sortie>;
|
|
826
|
+
export function getSortieFrom(snapshot?: {
|
|
827
|
+
raw?: {
|
|
828
|
+
sortie?: {
|
|
829
|
+
activation?: Date;
|
|
830
|
+
expiry?: Date;
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
sortieRaw?: RawSortie;
|
|
834
|
+
}): Promise<WarframeResult<Sortie>>;
|
|
835
|
+
export function getSortie(): Promise<WarframeResult<Sortie>>;
|
|
730
836
|
export function getWeekly(): Promise<WarframeResult<{
|
|
731
837
|
archonHunt: ArchonHunt;
|
|
732
838
|
deepArchimedea: ArchiMedea;
|
|
733
839
|
temporalArchimedea: ArchiMedea;
|
|
734
840
|
}>>;
|
|
841
|
+
export function resolveNightwave(raw: RawSeasonInfo | undefined, now?: number): WarframeResult<NightwaveBoard>;
|
|
842
|
+
export function getNightwave(): Promise<WarframeResult<NightwaveBoard>>;
|
|
735
843
|
export function getEnvironment(): Promise<string>;
|
|
736
844
|
export function getBounty(location: BountyLocation): Promise<WarframeResult<BountyBoard>>;
|
|
737
845
|
export function getCircuitWeek(): {
|
|
@@ -951,6 +1059,8 @@ declare module "i18n" {
|
|
|
951
1059
|
readonly 'relic.notFound': "未找到对应遗物信息";
|
|
952
1060
|
readonly 'arbitration.invalidDayRange': "天数需小于等于14且大于0";
|
|
953
1061
|
readonly 'bounty.unavailable': "当前该地点暂无可用赏金";
|
|
1062
|
+
readonly 'nightwave.unavailable': "当前没有午夜电波";
|
|
1063
|
+
readonly 'sortie.unavailable': "当前没有突击";
|
|
954
1064
|
readonly 'voidTrader.drifting': "虚空商人仍在未知地带漂流...";
|
|
955
1065
|
readonly 'voidTrader.arriving': "距离虚空商人到达还有: {time}";
|
|
956
1066
|
readonly 'riven.imageNotFound': "未检测到图片";
|
|
@@ -1013,13 +1123,15 @@ declare module "utils/index" {
|
|
|
1013
1123
|
declare module "components/wf" {
|
|
1014
1124
|
import type { Element } from 'koishi';
|
|
1015
1125
|
import type { WeeklyRiven } from 'warframe-weekly-rivens';
|
|
1016
|
-
import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, Fissure, OutputRelic, RivenStatAnalyzeResult, RivenStatResult, VoidTrader } from "warframe/index";
|
|
1126
|
+
import type { Arbitration, ArchiMedea, ArchonHunt, BountyBoard, Fissure, NightwaveBoard, OutputRelic, RivenStatAnalyzeResult, RivenStatResult, Sortie, VoidTrader } from "warframe/index";
|
|
1017
1127
|
export function ArbitrationComponent(arbi: Arbitration[]): Element;
|
|
1018
1128
|
export function CircuitComponent(currentIncarnons: number, currentWarframes: number, allIncarnons: string[][], allWarframes: string[][]): Element;
|
|
1019
1129
|
export function FissureComponent(fissures: Fissure[], type: 'fissure' | 'sp-fissure' | 'rj-fissure'): Element;
|
|
1020
1130
|
export function BountyComponent(board: BountyBoard): Element;
|
|
1021
1131
|
export function WeeklyRivenComponent(items: WeeklyRiven[], minPrice: number): Element;
|
|
1022
1132
|
export function WeeklyComponent(archon: ArchonHunt, deepArchimedea: ArchiMedea, temporalArchimedea: ArchiMedea): Element;
|
|
1133
|
+
export function NightwaveComponent(board: NightwaveBoard): Element;
|
|
1134
|
+
export function SortieComponent(sortie: Sortie): Element;
|
|
1023
1135
|
export function RelicComponent(relic: OutputRelic): Element;
|
|
1024
1136
|
export function RivenComponent(data: RivenStatAnalyzeResult): Element;
|
|
1025
1137
|
export function RivenStatComponent(data: RivenStatResult): Element;
|
|
@@ -1039,6 +1151,8 @@ declare module "commands/wf" {
|
|
|
1039
1151
|
rivenCommand: (_action: Argv, input: Dict) => Promise<string>;
|
|
1040
1152
|
rivenStatCommand: (_action: Argv, weaponType: string, statType: string, disposition: number) => Promise<string>;
|
|
1041
1153
|
weeklyCommand: (_action: Argv) => Promise<string>;
|
|
1154
|
+
nightwaveCommand: (_action: Argv) => Promise<string>;
|
|
1155
|
+
sortieCommand: (_action: Argv) => Promise<string>;
|
|
1042
1156
|
weeklyRivenCommand: (_action: Argv, minPrice?: number) => Promise<string>;
|
|
1043
1157
|
environmentCommand: () => Promise<string>;
|
|
1044
1158
|
bountyCetusCommand: () => Promise<string>;
|