koishi-plugin-warframe 1.16.1 → 1.16.3
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 +39 -9
- package/lib/index.js +328 -237
- package/lib/index.tsbuildinfo +1 -1
- package/lib/warframe/assets/en.json +1 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -32,6 +32,17 @@ declare module "warframe/types/ocr" {
|
|
|
32
32
|
id: string;
|
|
33
33
|
key: string;
|
|
34
34
|
}
|
|
35
|
+
/** Vendor-neutral OCR evidence; coordinates are in image pixels. */
|
|
36
|
+
export interface OcrTextBlock {
|
|
37
|
+
text: string;
|
|
38
|
+
confidence?: number;
|
|
39
|
+
box?: {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
35
46
|
}
|
|
36
47
|
declare module "warframe/types/warframe-result" {
|
|
37
48
|
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"];
|
|
@@ -88,6 +99,7 @@ declare module "warframe/types/wf/alert" {
|
|
|
88
99
|
count: number;
|
|
89
100
|
}
|
|
90
101
|
export interface AlertInfo {
|
|
102
|
+
description?: string;
|
|
91
103
|
type: string;
|
|
92
104
|
node: WFRegionShort;
|
|
93
105
|
rewards: AlertReward[];
|
|
@@ -910,12 +922,20 @@ declare module "warframe/infrastructure/wf/bounty-adapter" {
|
|
|
910
922
|
export function formatOracleChallenge(challengePath: string): string;
|
|
911
923
|
export function adaptOracleBountyBoard(location: 'zariman' | 'cavia' | 'hex', cycle: OracleBountyCycle | undefined): BountyBoard | undefined;
|
|
912
924
|
}
|
|
925
|
+
declare module "warframe/infrastructure/wf/alert-adapter" {
|
|
926
|
+
/** Translate known alert text and keep unknown/localized values intact. */
|
|
927
|
+
export function translateAlertText(source: string): Promise<string>;
|
|
928
|
+
}
|
|
913
929
|
declare module "warframe/services/wf-service/wf-service.alert" {
|
|
914
930
|
import type { AlertBoard, WarframeResult } from "warframe/types/index";
|
|
915
931
|
export function adaptAlerts(alerts?: readonly {
|
|
916
932
|
expiry?: Date;
|
|
933
|
+
description?: string;
|
|
917
934
|
mission?: {
|
|
935
|
+
description?: string;
|
|
936
|
+
node?: string;
|
|
918
937
|
nodeKey?: string;
|
|
938
|
+
type?: string;
|
|
919
939
|
typeKey?: string;
|
|
920
940
|
minEnemyLevel?: number;
|
|
921
941
|
maxEnemyLevel?: number;
|
|
@@ -923,6 +943,7 @@ declare module "warframe/services/wf-service/wf-service.alert" {
|
|
|
923
943
|
reward?: {
|
|
924
944
|
items?: string[];
|
|
925
945
|
countedItems?: Array<{
|
|
946
|
+
uniqueName?: string;
|
|
926
947
|
type?: string;
|
|
927
948
|
key?: string;
|
|
928
949
|
count?: number;
|
|
@@ -1051,6 +1072,19 @@ declare module "warframe/data/wf/rivenDisposition" {
|
|
|
1051
1072
|
export function buildWeaponRivenDispositionDict(weapons: RivenExportWeapon[], namesZh: Record<string, string>, types: Record<string, string>): Record<string, RivenWeaponDisposition>;
|
|
1052
1073
|
export const weaponRivenDispositionDict: Record<string, RivenWeaponDisposition>;
|
|
1053
1074
|
}
|
|
1075
|
+
declare module "warframe/services/riven/ocr" {
|
|
1076
|
+
import type { RivenCalculationStat } from "warframe/infrastructure/wf/riven-export-adapter";
|
|
1077
|
+
import type { OcrTextBlock } from "warframe/types/ocr";
|
|
1078
|
+
export interface ParsedRiven {
|
|
1079
|
+
name: string;
|
|
1080
|
+
attributes: {
|
|
1081
|
+
attr: RivenCalculationStat;
|
|
1082
|
+
value: number;
|
|
1083
|
+
prefix: string;
|
|
1084
|
+
}[];
|
|
1085
|
+
}
|
|
1086
|
+
export function parseRivenOcr(input: readonly (string | OcrTextBlock)[]): ParsedRiven | undefined;
|
|
1087
|
+
}
|
|
1054
1088
|
declare module "warframe/data/wf/rivenStatData" {
|
|
1055
1089
|
import type { RivenStatFixFactorMap } from "warframe/types/index";
|
|
1056
1090
|
export const rivenStatFixFactor: RivenStatFixFactorMap;
|
|
@@ -1172,26 +1206,22 @@ declare module "warframe/data/wfm/globalRivenItem" {
|
|
|
1172
1206
|
}
|
|
1173
1207
|
declare module "warframe/infrastructure/ocr-api" {
|
|
1174
1208
|
import type { OcrAPISecret } from "warframe/types/index";
|
|
1175
|
-
|
|
1209
|
+
import type { OcrTextBlock } from "warframe/types/ocr";
|
|
1210
|
+
export function extractTextFromImage(image: string | Blob, secret: OcrAPISecret): Promise<OcrTextBlock[] | undefined>;
|
|
1176
1211
|
}
|
|
1177
1212
|
declare module "warframe/services/wf-service/wf-service.riven" {
|
|
1178
1213
|
import type { WeeklyRiven } from 'warframe-weekly-rivens';
|
|
1179
1214
|
import type { OcrAPISecret, RivenStatAnalyzeResult, RivenStatResult, WarframeResult } from "warframe/types/index";
|
|
1215
|
+
import type { OcrTextBlock } from "warframe/types/ocr";
|
|
1180
1216
|
import type { RivenCalculationAttribute } from "warframe/types/wf/riven";
|
|
1217
|
+
import type { ParsedRiven } from "warframe/services/riven/ocr";
|
|
1181
1218
|
import { weaponRivenDispositionDict } from "warframe/data/wf/rivenDisposition";
|
|
1182
1219
|
export function getAnalyzedRiven(secret: OcrAPISecret, url: string, variant?: string): Promise<WarframeResult<RivenStatAnalyzeResult>>;
|
|
1183
1220
|
export function filterWeeklyRivens(data: WeeklyRiven[], minPrice: number, minPop?: number): WeeklyRiven[];
|
|
1184
1221
|
export function getWeeklyRivens(minPrice: number): Promise<WeeklyRiven[]>;
|
|
1185
1222
|
export function getStaticRivenStats(weaponType: string, statType: string, disposition: number): Promise<WarframeResult<RivenStatResult>>;
|
|
1186
1223
|
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>;
|
|
1224
|
+
export function parseOCRResult(ocrResult: readonly (string | OcrTextBlock)[]): Promise<ParsedRiven | undefined>;
|
|
1195
1225
|
export function analyzeRivenStat(parseResult: {
|
|
1196
1226
|
name: string;
|
|
1197
1227
|
attributes: {
|