koishi-plugin-warframe 1.4.1 → 1.4.4
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 +514 -100
- package/lib/index.js +2437 -1838
- package/package.json +12 -9
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { IRegion } from 'warframe-public-export-plus';
|
|
1
|
+
import { IRegion, TMissionType } from 'warframe-public-export-plus';
|
|
2
2
|
import Puppeteer from 'koishi-plugin-puppeteer';
|
|
3
|
-
import Element from '
|
|
4
|
-
import { Element, Dict, Argv, Context, Schema } from 'koishi';
|
|
3
|
+
import { Element, Argv, Dict, Context, Schema } from 'koishi';
|
|
5
4
|
import WorldState from 'warframe-worldstate-parser';
|
|
6
|
-
import {
|
|
5
|
+
import { RivenWeaponDisposition, RivenStatFixFactorMap } from '../../types/wf/riven';
|
|
6
|
+
import { RivenStatAnalyzeResult, RivenStatResult } from '../types/wf/riven';
|
|
7
|
+
import Element from '@satorijs/element';
|
|
7
8
|
export const toTimeStamp: (timeStr: string) => number;
|
|
8
9
|
/**
|
|
9
10
|
* 毫秒转「X小时X分钟X秒」格式(0单位不显示)
|
|
@@ -21,13 +22,11 @@ export const toTimeStamp: (timeStr: string) => number;
|
|
|
21
22
|
export const msToHumanReadable: (ms: number) => string;
|
|
22
23
|
/**
|
|
23
24
|
* Creates an async cache with a time-to-live (TTL).
|
|
24
|
-
* @param
|
|
25
|
-
* @param ttlMs Time-to-live in milliseconds.
|
|
25
|
+
* @param factory Function to fetch fresh data.
|
|
26
|
+
* @param ttlMs Time-to-live in milliseconds. Defaults to 60_000 meaning 1 minute. Set to -1 for infinity duration.
|
|
26
27
|
* @returns
|
|
27
28
|
*/
|
|
28
|
-
export function createAsyncCache<T>(
|
|
29
|
-
get: () => Promise<T>;
|
|
30
|
-
};
|
|
29
|
+
export function createAsyncCache<T>(factory: AsyncCacheFactory<T>, ttlMs?: number): AsyncCache<T>;
|
|
31
30
|
export const normalizeName: (text: string) => string;
|
|
32
31
|
export const fullWidthToHalfWidth: (text: string) => string;
|
|
33
32
|
export const removeSpace: (text: string) => string;
|
|
@@ -35,20 +34,12 @@ export const pascalToSpaced: (text: string) => string;
|
|
|
35
34
|
export const toPascalCase: (text: string) => string;
|
|
36
35
|
export function normalSimilarity(a: string, b: string): number;
|
|
37
36
|
export function tokenSimilarity(a: string, b: string): number;
|
|
38
|
-
export const fetchAsyncText: (url: string, method?: string) => Promise<string |
|
|
39
|
-
export const fetchAsyncData: <T>(url: string, method?: string) => Promise<T |
|
|
40
|
-
export const fetchAsyncImage: (url: string, method?: string) => Promise<Blob |
|
|
41
|
-
export const listToDict: <T>(dict: T[], predict: (obj: T) => string[]) =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export const listToDictSpec: <TObj, TValue>(dict: TObj[], predict: (obj: TObj) => string[], value: (obj: TObj) => TValue) => {
|
|
45
|
-
[key: string]: TValue;
|
|
46
|
-
};
|
|
47
|
-
export const dictToKeyDict: <T>(dict: {
|
|
48
|
-
[key: string]: T;
|
|
49
|
-
}, predict: (obj: T) => string[]) => {
|
|
50
|
-
[key: string]: string;
|
|
51
|
-
};
|
|
37
|
+
export const fetchAsyncText: (url: string, method?: string) => Promise<string | undefined>;
|
|
38
|
+
export const fetchAsyncData: <T>(url: string, method?: string) => Promise<T | undefined>;
|
|
39
|
+
export const fetchAsyncImage: (url: string, method?: string) => Promise<Blob | undefined>;
|
|
40
|
+
export const listToDict: <T>(dict: T[], predict: (obj: T) => string[]) => Record<string, T>;
|
|
41
|
+
export const listToDictSpec: <TObj, TValue>(dict: TObj[], predict: (obj: TObj) => string[], value: (obj: TObj) => TValue) => Record<string, TValue>;
|
|
42
|
+
export const dictToKeyDict: <T>(dict: Record<string, T>, predict: (obj: T) => string[]) => Record<string, string>;
|
|
52
43
|
export const lerp: (start: number, end: number, t: number) => number;
|
|
53
44
|
export const hexToRgb: (hex: string) => {
|
|
54
45
|
r: number;
|
|
@@ -79,8 +70,10 @@ export const relicQualityToTransKey: (quality: string) => string;
|
|
|
79
70
|
export const relicEraToTransKey: (era: string) => string;
|
|
80
71
|
export const fixRelicRewardKey: (item: string) => string;
|
|
81
72
|
export const relicToFullNameZH: (tier: string, category: string) => string;
|
|
73
|
+
export const extractTextFromImage: (image: string | Blob, secret: OcrAPISecret) => Promise<string[] | undefined>;
|
|
74
|
+
export const generateImageOutput: (puppe: Puppeteer, element: Element) => Promise<string>;
|
|
82
75
|
export const getSolNodeKey: (name: string) => Promise<string>;
|
|
83
|
-
export const getMissionTypeKey: (name: string) => Promise<
|
|
76
|
+
export const getMissionTypeKey: (name: string) => Promise<TMissionType>;
|
|
84
77
|
export const fissureTierName: {
|
|
85
78
|
1: string;
|
|
86
79
|
2: string;
|
|
@@ -101,38 +94,446 @@ export const getVoidTraderItem: (i: {
|
|
|
101
94
|
ducats: number;
|
|
102
95
|
credits: number;
|
|
103
96
|
};
|
|
104
|
-
export
|
|
105
|
-
export
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
97
|
+
export * from "utils/output";
|
|
98
|
+
export interface Ducatnator {
|
|
99
|
+
datetime: Date;
|
|
100
|
+
position_change_month: number;
|
|
101
|
+
position_change_week: number;
|
|
102
|
+
position_change_day: number;
|
|
103
|
+
plat_worth: number;
|
|
104
|
+
volume: number;
|
|
105
|
+
ducats_per_platinum: number;
|
|
106
|
+
ducats_per_platinum_wa: number;
|
|
107
|
+
ducats: number;
|
|
108
|
+
item: string;
|
|
109
|
+
median: number;
|
|
110
|
+
wa_price: number;
|
|
111
|
+
id: string;
|
|
112
|
+
}
|
|
113
|
+
export type WFMLang = "ko" | "ru" | "de" | "fr" | "pt" | "zh-hans" | "zh-hant" | "es" | "it" | "pl" | "uk" | "en";
|
|
114
|
+
declare interface ItemI18N {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
wikiLink: string;
|
|
118
|
+
icon: string;
|
|
119
|
+
thumb: string;
|
|
120
|
+
subIcon: string;
|
|
121
|
+
}
|
|
122
|
+
export interface Item {
|
|
123
|
+
id: string;
|
|
124
|
+
tags: string[];
|
|
125
|
+
slug: string;
|
|
126
|
+
gameRef: string;
|
|
127
|
+
tradable: boolean;
|
|
128
|
+
setRoot: boolean;
|
|
129
|
+
setParts: string[];
|
|
130
|
+
quantityInSet: number;
|
|
131
|
+
i18n: Partial<Record<WFMLang, ItemI18N>>;
|
|
132
|
+
rarity: string;
|
|
133
|
+
maxRank: number;
|
|
134
|
+
maxCharges: number;
|
|
135
|
+
bulkTradable: boolean;
|
|
136
|
+
subtypes: string[];
|
|
137
|
+
maxAmberStars: number;
|
|
138
|
+
maxCyanStars: number;
|
|
139
|
+
baseEndo: number;
|
|
140
|
+
endoMultiplier: number;
|
|
141
|
+
ducats: number;
|
|
142
|
+
reqMasteryRank: number;
|
|
143
|
+
vaulted: boolean;
|
|
144
|
+
tradingTax: number;
|
|
145
|
+
}
|
|
146
|
+
export interface ItemShort {
|
|
147
|
+
id: string;
|
|
148
|
+
slug: string;
|
|
149
|
+
gameRef: string;
|
|
150
|
+
tags: string[];
|
|
151
|
+
i18n: Partial<Record<WFMLang, ItemI18N>>;
|
|
152
|
+
maxRank: number;
|
|
153
|
+
maxCharges: number;
|
|
154
|
+
vaulted: boolean;
|
|
155
|
+
ducats: number;
|
|
156
|
+
amberStars: number;
|
|
157
|
+
cyanStars: number;
|
|
158
|
+
baseEndo: number;
|
|
159
|
+
endoMultiplier: number;
|
|
160
|
+
subtypes: string[];
|
|
161
|
+
}
|
|
162
|
+
export interface RivenItem {
|
|
163
|
+
id: string;
|
|
164
|
+
slug: string;
|
|
165
|
+
gameRef: string;
|
|
166
|
+
group?: string;
|
|
167
|
+
rivenType?: string;
|
|
168
|
+
disposition: number;
|
|
169
|
+
reqMasteryRank: number;
|
|
170
|
+
i18n?: Record<string, RivenItemI18N | null>;
|
|
171
|
+
}
|
|
172
|
+
declare interface RivenItemI18N {
|
|
173
|
+
name?: string;
|
|
174
|
+
wikiLink?: string;
|
|
175
|
+
icon: string;
|
|
176
|
+
thumb: string;
|
|
177
|
+
}
|
|
178
|
+
declare interface Activity {
|
|
179
|
+
type: string;
|
|
180
|
+
details: string;
|
|
181
|
+
startedAt: string;
|
|
182
|
+
}
|
|
183
|
+
export interface UserShort {
|
|
184
|
+
id: string;
|
|
185
|
+
ingameName: string;
|
|
186
|
+
avatar: string;
|
|
187
|
+
reputation: number;
|
|
188
|
+
locale: string;
|
|
189
|
+
platform: string;
|
|
190
|
+
crossplay: boolean;
|
|
191
|
+
status: string | "offline" | "online" | "ingame";
|
|
192
|
+
activity: Activity;
|
|
193
|
+
lastSeen: string;
|
|
194
|
+
}
|
|
195
|
+
declare interface Order {
|
|
196
|
+
id: string;
|
|
197
|
+
type: string;
|
|
198
|
+
platinum: number;
|
|
199
|
+
quantity: number;
|
|
200
|
+
perTrade: number;
|
|
201
|
+
rank: number;
|
|
202
|
+
charges: number;
|
|
203
|
+
subtype: string;
|
|
204
|
+
amberStars: number;
|
|
205
|
+
cyanStars: number;
|
|
206
|
+
vosfor: number;
|
|
207
|
+
visible: boolean;
|
|
208
|
+
createdAt: string;
|
|
209
|
+
updatedAt: string;
|
|
210
|
+
itemId: string;
|
|
211
|
+
}
|
|
212
|
+
export interface OrderWithUser extends Order {
|
|
213
|
+
user: UserShort;
|
|
214
|
+
}
|
|
215
|
+
export type RivenAttributeUnit = "percent" | "multiply" | "seconds" | string;
|
|
216
|
+
declare interface RivenAttributeI18N {
|
|
217
|
+
name: string;
|
|
218
|
+
icon: string;
|
|
219
|
+
thumb: string;
|
|
220
|
+
}
|
|
221
|
+
export interface RivenAttribute {
|
|
222
|
+
id: string;
|
|
223
|
+
slug: string;
|
|
224
|
+
gameRef: string;
|
|
225
|
+
group: string;
|
|
226
|
+
prefix: string;
|
|
227
|
+
suffix: string;
|
|
228
|
+
exclusiveTo: Array<"shotgun" | "rifle" | "pistol" | "kitgun" | string>;
|
|
229
|
+
positiveIsNegative: boolean;
|
|
230
|
+
positiveOnly: boolean;
|
|
231
|
+
negativeOnly: boolean;
|
|
232
|
+
unit: RivenAttributeUnit;
|
|
233
|
+
i18n: Record<WFMLang, RivenAttributeI18N>;
|
|
234
|
+
}
|
|
235
|
+
declare interface Riven {
|
|
236
|
+
polarity: string;
|
|
237
|
+
mod_rank: number;
|
|
238
|
+
re_rolls: number;
|
|
239
|
+
attributes: RivenAttributeShort[];
|
|
240
|
+
type: string;
|
|
241
|
+
name: string;
|
|
242
|
+
weapon_url_name: string;
|
|
243
|
+
mastery_level: number;
|
|
244
|
+
}
|
|
245
|
+
declare interface RivenAttributeShort {
|
|
246
|
+
value: number;
|
|
247
|
+
positive: boolean;
|
|
248
|
+
url_name: string;
|
|
249
|
+
}
|
|
250
|
+
export interface RivenOrder {
|
|
251
|
+
buyout_price: number | null;
|
|
252
|
+
visible: boolean;
|
|
253
|
+
minimal_reputation: number;
|
|
254
|
+
starting_price: number;
|
|
255
|
+
note: string;
|
|
256
|
+
platform: string;
|
|
257
|
+
crossplay: boolean;
|
|
258
|
+
closed: boolean;
|
|
259
|
+
top_bid: number | null;
|
|
260
|
+
is_marked_for: string | null;
|
|
261
|
+
marked_operation_at: string | null;
|
|
262
|
+
created: string;
|
|
263
|
+
updated: string;
|
|
264
|
+
note_raw: string;
|
|
265
|
+
is_direct_sell: boolean;
|
|
266
|
+
id: string;
|
|
267
|
+
owner: RivenUser;
|
|
268
|
+
winner: RivenUser | null;
|
|
269
|
+
item: Riven;
|
|
270
|
+
private: boolean;
|
|
271
|
+
}
|
|
272
|
+
declare interface RivenUser {
|
|
273
|
+
reputation: number;
|
|
274
|
+
platform: string;
|
|
275
|
+
locale: string;
|
|
276
|
+
avatar: string | null;
|
|
277
|
+
last_seen: string;
|
|
278
|
+
crossplay: boolean;
|
|
279
|
+
ingame_name: string;
|
|
280
|
+
slug: string;
|
|
281
|
+
status: "offline" | "online" | "ingame" | string;
|
|
282
|
+
id: string;
|
|
283
|
+
region: string;
|
|
284
|
+
}
|
|
285
|
+
export interface RivenAttributeShortInternal extends RivenAttributeShort {
|
|
286
|
+
attribute: RivenAttribute;
|
|
287
|
+
}
|
|
288
|
+
declare interface RivenInternal extends Riven {
|
|
289
|
+
attributes: RivenAttributeShortInternal[];
|
|
290
|
+
}
|
|
291
|
+
export interface RivenOrderInternal extends RivenOrder {
|
|
292
|
+
item: RivenInternal;
|
|
293
|
+
}
|
|
294
|
+
export interface DucatnatorDTO {
|
|
295
|
+
datetime: Date;
|
|
296
|
+
position_change_month: number;
|
|
297
|
+
position_change_week: number;
|
|
298
|
+
position_change_day: number;
|
|
299
|
+
plat_worth: number;
|
|
300
|
+
volume: number;
|
|
301
|
+
ducats_per_platinum: number;
|
|
302
|
+
ducats_per_platinum_wa: number;
|
|
303
|
+
ducats: number;
|
|
304
|
+
item: string;
|
|
305
|
+
median: number;
|
|
306
|
+
wa_price: number;
|
|
307
|
+
id: string;
|
|
308
|
+
}
|
|
309
|
+
declare interface ItemI18NDTO {
|
|
310
|
+
name: string;
|
|
311
|
+
description: string;
|
|
312
|
+
wikiLink: string;
|
|
313
|
+
icon: string;
|
|
314
|
+
thumb: string;
|
|
315
|
+
subIcon: string;
|
|
316
|
+
}
|
|
317
|
+
export interface ItemDTO {
|
|
318
|
+
id: string;
|
|
319
|
+
tags: string[];
|
|
320
|
+
slug: string;
|
|
321
|
+
gameRef: string;
|
|
322
|
+
tradable: boolean;
|
|
323
|
+
setRoot: boolean;
|
|
324
|
+
setParts: string[];
|
|
325
|
+
quantityInSet: number;
|
|
326
|
+
i18n: Partial<Record<WFMLangDTO, ItemI18NDTO>>;
|
|
327
|
+
rarity: string;
|
|
328
|
+
maxRank: number;
|
|
329
|
+
maxCharges: number;
|
|
330
|
+
bulkTradable: boolean;
|
|
331
|
+
subtypes: string[];
|
|
332
|
+
maxAmberStars: number;
|
|
333
|
+
maxCyanStars: number;
|
|
334
|
+
baseEndo: number;
|
|
335
|
+
endoMultiplier: number;
|
|
336
|
+
ducats: number;
|
|
337
|
+
reqMasteryRank: number;
|
|
338
|
+
vaulted: boolean;
|
|
339
|
+
tradingTax: number;
|
|
340
|
+
}
|
|
341
|
+
export interface ItemShortDTO {
|
|
342
|
+
id: string;
|
|
343
|
+
slug: string;
|
|
344
|
+
gameRef: string;
|
|
345
|
+
tags: string[];
|
|
346
|
+
i18n: Partial<Record<WFMLangDTO, ItemI18NDTO>>;
|
|
347
|
+
maxRank: number;
|
|
348
|
+
maxCharges: number;
|
|
349
|
+
vaulted: boolean;
|
|
350
|
+
ducats: number;
|
|
351
|
+
amberStars: number;
|
|
352
|
+
cyanStars: number;
|
|
353
|
+
baseEndo: number;
|
|
354
|
+
endoMultiplier: number;
|
|
355
|
+
subtypes: string[];
|
|
356
|
+
}
|
|
357
|
+
export interface RivenItemDTO {
|
|
358
|
+
id: string;
|
|
359
|
+
slug: string;
|
|
360
|
+
gameRef: string;
|
|
361
|
+
group?: string;
|
|
362
|
+
rivenType?: string;
|
|
363
|
+
disposition: number;
|
|
364
|
+
reqMasteryRank: number;
|
|
365
|
+
i18n?: Record<string, RivenItemI18NDTO | null>;
|
|
366
|
+
}
|
|
367
|
+
declare interface RivenItemI18NDTO {
|
|
368
|
+
name?: string;
|
|
369
|
+
wikiLink?: string;
|
|
370
|
+
icon: string;
|
|
371
|
+
thumb: string;
|
|
372
|
+
}
|
|
373
|
+
declare interface ActivityDTO {
|
|
374
|
+
type: string;
|
|
375
|
+
details: string;
|
|
376
|
+
startedAt: string;
|
|
377
|
+
}
|
|
378
|
+
export interface UserShortDTO {
|
|
379
|
+
id: string;
|
|
380
|
+
ingameName: string;
|
|
381
|
+
avatar: string;
|
|
382
|
+
reputation: number;
|
|
383
|
+
locale: string;
|
|
384
|
+
platform: string;
|
|
385
|
+
crossplay: boolean;
|
|
386
|
+
status: string | "offline" | "online" | "ingame";
|
|
387
|
+
activity: ActivityDTO;
|
|
388
|
+
lastSeen: string;
|
|
389
|
+
}
|
|
390
|
+
declare interface OrderDTO {
|
|
391
|
+
id: string;
|
|
392
|
+
type: string;
|
|
393
|
+
platinum: number;
|
|
394
|
+
quantity: number;
|
|
395
|
+
perTrade: number;
|
|
396
|
+
rank: number;
|
|
397
|
+
charges: number;
|
|
398
|
+
subtype: string;
|
|
399
|
+
amberStars: number;
|
|
400
|
+
cyanStars: number;
|
|
401
|
+
vosfor: number;
|
|
402
|
+
visible: boolean;
|
|
403
|
+
createdAt: string;
|
|
404
|
+
updatedAt: string;
|
|
405
|
+
itemId: string;
|
|
406
|
+
}
|
|
407
|
+
export interface OrderWithUserDTO extends OrderDTO {
|
|
408
|
+
user: UserShortDTO;
|
|
409
|
+
}
|
|
410
|
+
declare interface RivenDTO {
|
|
411
|
+
polarity: string;
|
|
412
|
+
mod_rank: number;
|
|
413
|
+
re_rolls: number;
|
|
414
|
+
attributes: RivenAttributeShortDTO[];
|
|
415
|
+
type: string;
|
|
416
|
+
name: string;
|
|
417
|
+
weapon_url_name: string;
|
|
418
|
+
mastery_level: number;
|
|
419
|
+
}
|
|
420
|
+
declare interface RivenAttributeShortDTO {
|
|
421
|
+
value: number;
|
|
422
|
+
positive: boolean;
|
|
423
|
+
url_name: string;
|
|
424
|
+
}
|
|
425
|
+
type RivenAttributeUnitDTO = "percent" | "multiply" | "seconds" | string;
|
|
426
|
+
declare interface RivenAttributeI18NDTO {
|
|
427
|
+
name: string;
|
|
428
|
+
icon: string;
|
|
429
|
+
thumb: string;
|
|
430
|
+
}
|
|
431
|
+
export interface RivenAttributeDTO {
|
|
432
|
+
id: string;
|
|
433
|
+
slug: string;
|
|
434
|
+
gameRef: string;
|
|
435
|
+
group: string;
|
|
436
|
+
prefix: string;
|
|
437
|
+
suffix: string;
|
|
438
|
+
exclusiveTo: Array<"shotgun" | "rifle" | "pistol" | "kitgun" | string>;
|
|
439
|
+
positiveIsNegative: boolean;
|
|
440
|
+
positiveOnly: boolean;
|
|
441
|
+
negativeOnly: boolean;
|
|
442
|
+
unit: RivenAttributeUnitDTO;
|
|
443
|
+
i18n: Record<WFMLangDTO, RivenAttributeI18NDTO>;
|
|
444
|
+
}
|
|
445
|
+
export interface RivenOrderDTO {
|
|
446
|
+
buyout_price: number | null;
|
|
447
|
+
visible: boolean;
|
|
448
|
+
minimal_reputation: number;
|
|
449
|
+
starting_price: number;
|
|
450
|
+
note: string;
|
|
451
|
+
platform: string;
|
|
452
|
+
crossplay: boolean;
|
|
453
|
+
closed: boolean;
|
|
454
|
+
top_bid: number | null;
|
|
455
|
+
is_marked_for: string | null;
|
|
456
|
+
marked_operation_at: string | null;
|
|
457
|
+
created: string;
|
|
458
|
+
updated: string;
|
|
459
|
+
note_raw: string;
|
|
460
|
+
is_direct_sell: boolean;
|
|
461
|
+
id: string;
|
|
462
|
+
owner: RivenUserDTO;
|
|
463
|
+
winner: RivenUserDTO | null;
|
|
464
|
+
item: RivenDTO;
|
|
465
|
+
private: boolean;
|
|
466
|
+
}
|
|
467
|
+
declare interface RivenUserDTO {
|
|
468
|
+
reputation: number;
|
|
469
|
+
platform: string;
|
|
470
|
+
locale: string;
|
|
471
|
+
avatar: string | null;
|
|
472
|
+
last_seen: string;
|
|
473
|
+
crossplay: boolean;
|
|
474
|
+
ingame_name: string;
|
|
475
|
+
slug: string;
|
|
476
|
+
status: "offline" | "online" | "ingame" | string;
|
|
477
|
+
id: string;
|
|
478
|
+
region: string;
|
|
479
|
+
}
|
|
480
|
+
export const getWFMItemList: () => Promise<ItemShort[] | undefined>;
|
|
481
|
+
export const getWFMOrderList: (itemId: string) => Promise<OrderWithUser[] | undefined>;
|
|
482
|
+
export const getWFMRivenItemList: () => Promise<RivenItem[] | undefined>;
|
|
483
|
+
export const getWFMRivenOrderList: (itemId: string) => Promise<RivenOrder[] | undefined>;
|
|
484
|
+
export const getWFMRivenAttributeList: () => Promise<RivenAttribute[] | undefined>;
|
|
485
|
+
export const getWFMDucatnator: () => Promise<{
|
|
486
|
+
day: Ducatnator[];
|
|
487
|
+
hour: Ducatnator[];
|
|
488
|
+
} | undefined>;
|
|
489
|
+
export const globalItemDataFactory: (response?: ItemShort[]) => Promise<{
|
|
490
|
+
globalItemList: ItemShort[];
|
|
491
|
+
globalItemDict: Record<string, ItemShort>;
|
|
492
|
+
globalItemNameToSlugDict: Record<string, string>;
|
|
493
|
+
globalItemGameRefDict: Record<string, ItemShort>;
|
|
494
|
+
}>;
|
|
495
|
+
export let globalItemData: AsyncCache<{
|
|
496
|
+
globalItemList: ItemShort[];
|
|
497
|
+
globalItemDict: Record<string, ItemShort>;
|
|
498
|
+
globalItemNameToSlugDict: Record<string, string>;
|
|
499
|
+
globalItemGameRefDict: Record<string, ItemShort>;
|
|
500
|
+
}>;
|
|
501
|
+
export const overrideGlobalItemData: (cache: AsyncCache<{
|
|
502
|
+
globalItemList: ItemShort[];
|
|
503
|
+
globalItemDict: Record<string, ItemShort>;
|
|
504
|
+
globalItemNameToSlugDict: Record<string, string>;
|
|
505
|
+
globalItemGameRefDict: Record<string, ItemShort>;
|
|
506
|
+
}>) => void;
|
|
507
|
+
export const globalRivenItemData: AsyncCache<{
|
|
508
|
+
globalRivenItemList: RivenItem[];
|
|
509
|
+
globalRivenItemDict: Record<string, RivenItem>;
|
|
510
|
+
}>;
|
|
511
|
+
export const globalRivenAttributeFactory: (rivenAttributeData?: RivenAttribute[]) => Promise<{
|
|
512
|
+
globalRivenAttributeList: RivenAttribute[];
|
|
513
|
+
globalRivenAttributeDict: Record<string, RivenAttribute>;
|
|
514
|
+
}>;
|
|
515
|
+
export let globalRivenAttribute: AsyncCache<{
|
|
516
|
+
globalRivenAttributeList: RivenAttribute[];
|
|
517
|
+
globalRivenAttributeDict: Record<string, RivenAttribute>;
|
|
518
|
+
}>;
|
|
519
|
+
export const overrideGlobalRivenAttribute: (cache: AsyncCache<{
|
|
520
|
+
globalRivenAttributeList: RivenAttribute[];
|
|
521
|
+
globalRivenAttributeDict: {
|
|
522
|
+
[key: string]: RivenAttribute;
|
|
523
|
+
};
|
|
524
|
+
}>) => void;
|
|
525
|
+
export const globalDucatnatorIDDict: AsyncCache<Record<string, Ducatnator>>;
|
|
120
526
|
export const wmOnReady: () => Promise<void>;
|
|
121
|
-
export const setGlobalItem: (data: ItemShort[]) => void;
|
|
122
|
-
export const setGlobalRivenItem: (data: RivenItem[]) => void;
|
|
123
|
-
export const setGlobalRivenAttribute: (data: RivenAttribute[]) => void;
|
|
124
527
|
export const getItemOrders: (input: string) => Promise<{
|
|
125
528
|
item: ItemShort;
|
|
126
529
|
orders: OrderWithUser[];
|
|
127
530
|
}>;
|
|
128
|
-
export const generateItemOrderOutput: (puppe: Puppeteer, item: ItemShort, orders: OrderWithUser[]) => Promise<import("koishi").Element>;
|
|
129
531
|
export const getRivenOrders: (input: string) => Promise<{
|
|
130
532
|
item: RivenItem;
|
|
131
|
-
orders:
|
|
533
|
+
orders: RivenOrderInternal[];
|
|
132
534
|
}>;
|
|
133
|
-
export const generateRivenOrderOutput: (puppe: Puppeteer, item: RivenItem, orders: RivenOrder[]) => Promise<import("koishi").Element>;
|
|
134
535
|
export const applyRelicData: (relic: Relic) => Promise<OutputRelic>;
|
|
135
|
-
export const stringToWFMItem: (input: string) => ItemShort
|
|
536
|
+
export const stringToWFMItem: (input: string) => Promise<ItemShort>;
|
|
136
537
|
declare const _default: {
|
|
137
538
|
SolNode147: number;
|
|
138
539
|
SolNode149: number;
|
|
@@ -143,66 +544,46 @@ declare const _default: {
|
|
|
143
544
|
SolNode42: number;
|
|
144
545
|
ClanNode24: number;
|
|
145
546
|
};
|
|
146
|
-
|
|
147
|
-
export const incarnonRewards: string[][];
|
|
148
|
-
export const warframeRewards: string[][];
|
|
149
|
-
export const ArbitrationTable: (arbi: Arbitration[]) => Element;
|
|
150
|
-
export const CircuitTable: (incarnons: string[], warframes: string[]) => Element;
|
|
151
|
-
export const FissureTable: (fissures: Fissure[], type: "fissure" | "sp-fissure" | "rj-fissure") => Element;
|
|
152
|
-
export const WeeklyTable: (archon: string, deepArchimedea: ArchiMedea, temporalArchimedea: ArchiMedea) => Promise<string>;
|
|
153
|
-
export const RelicComponent: (relic: OutputRelic) => Element;
|
|
154
|
-
export const RivenComponent: (data: RivenStatAnalyzeResult) => Element;
|
|
155
|
-
export const VoidTraderComponent: (data: VoidTrader) => Element;
|
|
547
|
+
export const relics: Record<string, Relic>;
|
|
156
548
|
export const getWorldState: (json?: string) => Promise<WorldState>;
|
|
157
|
-
export const
|
|
549
|
+
export const globalWorldState: AsyncCache<{
|
|
550
|
+
raw: import("warframe-worldstate-parser").WorldState;
|
|
551
|
+
fissures: any[];
|
|
552
|
+
spFissures: any[];
|
|
553
|
+
rjFissures: any[];
|
|
554
|
+
}>;
|
|
555
|
+
declare const arbys: string;
|
|
556
|
+
export const arbitrationSchedule: ArbitrationShort[];
|
|
158
557
|
export const rivenAttrValueDict: Record<string, Record<string, number>>;
|
|
159
|
-
export const
|
|
558
|
+
export const weaponRivenDispositionDict: Record<string, RivenWeaponDisposition>;
|
|
559
|
+
export const rivenStatFixFactor: RivenStatFixFactorMap;
|
|
160
560
|
export const getRelic: (input: string) => Promise<Relic | string>;
|
|
161
|
-
export const generateRelicOutput: (puppe: Puppeteer, relic: OutputRelic) => Promise<import("koishi").Element>;
|
|
162
561
|
export const getArbitrations: (day?: number) => Arbitration[] | string;
|
|
163
|
-
export const generateArbitrationsOutput: (puppe: Puppeteer, arby: Arbitration[]) => Promise<import("koishi").Element>;
|
|
164
562
|
export const getWeekly: () => Promise<"内部错误,获取最新信息失败" | {
|
|
165
|
-
archonHunt:
|
|
563
|
+
archonHunt: ArchonHunt;
|
|
166
564
|
deepArchimedea: ArchiMedea;
|
|
167
565
|
temporalArchimedea: ArchiMedea;
|
|
168
566
|
}>;
|
|
169
|
-
export const
|
|
170
|
-
export const getRegionTime: () => Promise<string>;
|
|
567
|
+
export const getEnvironment: () => Promise<string>;
|
|
171
568
|
export const getCircuitWeek: () => {
|
|
172
569
|
incarnons: string[];
|
|
173
570
|
warframes: string[];
|
|
174
571
|
};
|
|
175
|
-
export const generateCircuitWeekOutput: (puppe: Puppeteer, data: {
|
|
176
|
-
incarnons: string[];
|
|
177
|
-
warframes: string[];
|
|
178
|
-
}) => Promise<import("koishi").Element>;
|
|
179
572
|
export const getFissures: () => Promise<any[] | "内部错误,获取最新信息失败">;
|
|
180
573
|
export const getSteelPathFissures: () => Promise<any[] | "内部错误,获取最新信息失败">;
|
|
181
574
|
export const getRailjackFissures: () => Promise<any[] | "内部错误,获取最新信息失败">;
|
|
182
|
-
export const
|
|
183
|
-
export const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
};
|
|
188
|
-
calc: {
|
|
189
|
-
disposition: number;
|
|
190
|
-
name: string;
|
|
191
|
-
texture: string;
|
|
192
|
-
riventype: string;
|
|
193
|
-
};
|
|
194
|
-
weapon: any;
|
|
195
|
-
};
|
|
196
|
-
export const getAnalyzedRiven: (secret: OcrAPISecret, dict: Dict) => Promise<string | RivenStatAnalyzeResult>;
|
|
197
|
-
export const generateAnalyzedRivenOutput: (puppe: Puppeteer, data: RivenStatAnalyzeResult) => Promise<import("koishi").Element>;
|
|
198
|
-
export const parseOCRResult: (ocrResult: GeneralAccurateOCRResponse) => {
|
|
575
|
+
export const getAnalyzedRiven: (secret: OcrAPISecret, url: string) => Promise<string | RivenStatAnalyzeResult>;
|
|
576
|
+
export const getVoidTrader: () => Promise<string | VoidTrader>;
|
|
577
|
+
export const getStaticRivenStats: (weaponType: string, statType: string, disposition: number) => Promise<RivenStatResult | string>;
|
|
578
|
+
export const getWeaponRivenDisposition: (name: string) => import("types/wf/riven").RivenWeaponDisposition;
|
|
579
|
+
export const parseOCRResult: (ocrResult: string[]) => Promise<{
|
|
199
580
|
name: string;
|
|
200
581
|
attributes: {
|
|
201
582
|
attr: RivenAttribute;
|
|
202
583
|
value: number;
|
|
203
584
|
prefix: string;
|
|
204
585
|
}[];
|
|
205
|
-
}
|
|
586
|
+
}>;
|
|
206
587
|
export const analyzeRivenStat: (parseResult: {
|
|
207
588
|
name: string;
|
|
208
589
|
attributes: {
|
|
@@ -211,21 +592,29 @@ export const analyzeRivenStat: (parseResult: {
|
|
|
211
592
|
prefix: string;
|
|
212
593
|
}[];
|
|
213
594
|
}) => RivenStatAnalyzeResult | string;
|
|
214
|
-
export const
|
|
215
|
-
export const
|
|
216
|
-
export const
|
|
217
|
-
export const
|
|
218
|
-
export const
|
|
219
|
-
export const
|
|
220
|
-
export const
|
|
221
|
-
export const
|
|
222
|
-
export const
|
|
223
|
-
export const circuitCommand: (action: Argv) => Promise<
|
|
224
|
-
export const
|
|
595
|
+
export const ArbitrationComponent: (arbi: Arbitration[]) => Element;
|
|
596
|
+
export const CircuitComponent: (incarnons: string[], warframes: string[]) => Element;
|
|
597
|
+
export const FissureComponent: (fissures: Fissure[], type: "fissure" | "sp-fissure" | "rj-fissure") => Element;
|
|
598
|
+
export const WeeklyComponent: (archon: ArchonHunt, deepArchimedea: ArchiMedea, temporalArchimedea: ArchiMedea) => Element;
|
|
599
|
+
export const RelicComponent: (relic: OutputRelic) => Element;
|
|
600
|
+
export const RivenComponent: (data: RivenStatAnalyzeResult) => Element;
|
|
601
|
+
export const RivenStatComponent: (data: RivenStatResult) => Element;
|
|
602
|
+
export const VoidTraderComponent: (data: VoidTrader) => Element;
|
|
603
|
+
export const arbitrationCommand: (action: Argv, input?: number) => Promise<string>;
|
|
604
|
+
export const circuitCommand: (action: Argv) => Promise<string>;
|
|
605
|
+
export const voidtraderCommand: (action: Argv) => Promise<string>;
|
|
606
|
+
export const fissureCommand: (action: Argv) => Promise<string>;
|
|
607
|
+
export const steelPathFissureCommand: (action: Argv) => Promise<string>;
|
|
608
|
+
export const railjackFissureCommand: (action: Argv) => Promise<string>;
|
|
609
|
+
export const relicCommand: (action: Argv, input: string) => Promise<string>;
|
|
610
|
+
export const rivenCommand: (action: Argv, input: Dict, secret: OcrAPISecret) => Promise<string>;
|
|
611
|
+
export const rivenStatCommand: (action: Argv, weaponType: string, statType: string, disposition: number) => Promise<string>;
|
|
225
612
|
export const weeklyCommand: (action: Argv) => Promise<string>;
|
|
226
|
-
export const
|
|
227
|
-
export const
|
|
228
|
-
export const
|
|
613
|
+
export const environmentCommand: () => Promise<string>;
|
|
614
|
+
export const ItemOrderComponent: (item: ItemShort, orders: OrderWithUser[]) => Element;
|
|
615
|
+
export const RivenOrderComponent: (item: RivenItem, orders: RivenOrderInternal[]) => Element;
|
|
616
|
+
export const wmCommand: (action: Argv, input: string) => Promise<string>;
|
|
617
|
+
export const wmrCommand: (action: Argv, input: string) => Promise<string>;
|
|
229
618
|
export const onReadyHandler: () => Promise<void>;
|
|
230
619
|
export const name = "warframe";
|
|
231
620
|
export interface Config {
|
|
@@ -234,3 +623,28 @@ export interface Config {
|
|
|
234
623
|
}
|
|
235
624
|
export const Config: Schema<Config>;
|
|
236
625
|
export function apply(ctx: Context): void;
|
|
626
|
+
WFMLangDTO = "ko" | "ru" | "de" | "fr" | "pt" | "zh-hans" | "zh-hant" | "es" | "it" | "pl" | "uk" | "en";
|
|
627
|
+
rface WFMResponse<TData> {
|
|
628
|
+
apiVersion: string;
|
|
629
|
+
data: TData;
|
|
630
|
+
error: any | null;
|
|
631
|
+
rface WFMResponseV1<TPayload> {
|
|
632
|
+
payload: TPayload;
|
|
633
|
+
rface Auction<TAuction> {
|
|
634
|
+
auctions: TAuction[];
|
|
635
|
+
rface ArchonHunt {
|
|
636
|
+
name: string;
|
|
637
|
+
rface ArchonHuntMissions {
|
|
638
|
+
type: string;
|
|
639
|
+
node: WFRegionShort;
|
|
640
|
+
rface ArchiMedea {
|
|
641
|
+
name: string;
|
|
642
|
+
missions: ArchiMedeaMission[];
|
|
643
|
+
peronal: ArchiMedeaDebuff[];
|
|
644
|
+
rface ArchiMedeaMission {
|
|
645
|
+
type: string;
|
|
646
|
+
deviation: ArchiMedeaDebuff;
|
|
647
|
+
risks: ArchiMedeaDebuff[];
|
|
648
|
+
rface ArchiMedeaDebuff {
|
|
649
|
+
name: string;
|
|
650
|
+
desc: string;
|