koishi-plugin-warframe 1.6.7 → 1.7.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 CHANGED
@@ -1,3 +1,38 @@
1
+ declare module "warframe/types/cache" {
2
+ export interface AsyncCache<T> {
3
+ get: () => Promise<T>;
4
+ update: () => Promise<T>;
5
+ }
6
+ export type AsyncCacheFactory<T> = () => Promise<T>;
7
+ }
8
+ declare module "warframe/types/miscs/lab" {
9
+ export type WeaponGroup = 'melee' | 'sentinel' | 'primary' | 'secondary' | 'archgun' | 'zaw';
10
+ export type RivenType = 'melee' | 'rifle' | 'pistol' | 'shotgun' | 'zaw';
11
+ export interface RivenWeaponItem {
12
+ slug: string;
13
+ name_en: string;
14
+ name_zh: string;
15
+ thumb: string;
16
+ group: WeaponGroup;
17
+ rivenType: RivenType;
18
+ disposition: number;
19
+ req_mr: number;
20
+ active_count: number;
21
+ min_price: number;
22
+ bottom_price: number;
23
+ ts: string;
24
+ }
25
+ export interface RivenWeaponResponse {
26
+ data: RivenWeaponItem[];
27
+ source: string;
28
+ }
29
+ }
30
+ declare module "warframe/types/ocr" {
31
+ export interface OcrAPISecret {
32
+ id: string;
33
+ key: string;
34
+ }
35
+ }
1
36
  declare module "warframe/types/warframe-result" {
2
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"];
3
38
  export type WarframeErrorCode = typeof warframeErrorCodes[number];
@@ -17,6 +52,216 @@ declare module "warframe/types/warframe-result" {
17
52
  } | WarframeFailure;
18
53
  export function failure(code: WarframeErrorCode, retryable?: boolean, params?: WarframeErrorParams): WarframeFailure;
19
54
  }
55
+ declare module "warframe/types/wf/region" {
56
+ export interface WFRegion {
57
+ name: string;
58
+ systemIndex: number;
59
+ systemName: string;
60
+ nodeType: number;
61
+ masteryReq: number;
62
+ missionType: string;
63
+ missionIndex: number;
64
+ missionName: string;
65
+ faction: string;
66
+ factionIndex: number;
67
+ factionName: string;
68
+ minEnemyLevel: number;
69
+ maxEnemyLevel: number;
70
+ masteryExp: number;
71
+ levelOverride: string;
72
+ rewardManifests: string[];
73
+ nextNodes: unknown[];
74
+ }
75
+ export interface WFRegionShort {
76
+ name: string;
77
+ system: string;
78
+ type: string;
79
+ faction: string;
80
+ minLevel: number;
81
+ maxLevel: number;
82
+ }
83
+ }
84
+ declare module "warframe/types/wf/arbitration" {
85
+ import type { WFRegionShort } from "warframe/types/wf/region";
86
+ export interface ArbitrationShort {
87
+ time: number;
88
+ node: string;
89
+ }
90
+ export interface Arbitration extends WFRegionShort {
91
+ time: string;
92
+ rewards: number;
93
+ }
94
+ }
95
+ declare module "warframe/types/wf/fissure" {
96
+ import type { WFRegionShort } from "warframe/types/wf/region";
97
+ export interface Fissure {
98
+ category: string;
99
+ hard: boolean;
100
+ /** Expire time. Timestamp in miliseconds */
101
+ activation: number;
102
+ /** Expire time. Timestamp in miliseconds */
103
+ expiry: number;
104
+ node: WFRegionShort;
105
+ tier: string;
106
+ tierNum: number;
107
+ }
108
+ }
109
+ declare module "warframe/types/wf/relic" {
110
+ export type RelicTier = 'Lith' | 'Meso' | 'Neo' | 'Axi' | 'Requiem' | 'Vanguard';
111
+ export type RelicQuality = 'Intact' | 'Exceptional' | 'Flawless' | 'Radiant';
112
+ export type RelicRewardRarity = 'COMMON' | 'UNCOMMON' | 'RARE';
113
+ export interface ExternalRelic {
114
+ tier: RelicTier;
115
+ num: string;
116
+ quality: RelicQuality;
117
+ items: ExternalRelicReward[];
118
+ }
119
+ export interface ExternalRelicReward {
120
+ name: string;
121
+ rate: number;
122
+ }
123
+ export interface Relic {
124
+ tier: RelicTier;
125
+ tierKey: string;
126
+ num: string;
127
+ items: RelicReward[];
128
+ }
129
+ export interface RelicReward {
130
+ name: string;
131
+ rarity: RelicRewardRarity;
132
+ quantity: number;
133
+ }
134
+ export interface OutputRelic {
135
+ tier: string;
136
+ num: string;
137
+ items: OutputRelicReward[];
138
+ }
139
+ export interface OutputRelicReward extends RelicReward {
140
+ ducats: number;
141
+ platinum?: number;
142
+ }
143
+ }
144
+ declare module "warframe/types/wfm" {
145
+ import type { RivenAttribute, RivenOrder } from 'wfm-api-client';
146
+ export type { Ducatnator, ItemShort, OrderWithUser, RivenAttribute, RivenAttributeUnit, RivenItem, RivenOrder, StatisticsCollection, WFMLang, } from 'wfm-api-client';
147
+ export interface PrimedModHistoryItem {
148
+ name: string | undefined;
149
+ last: string;
150
+ plats?: number;
151
+ }
152
+ export type RivenAttributeShortInternal = RivenOrder['item']['attributes'][number] & {
153
+ attribute: RivenAttribute;
154
+ };
155
+ export type RivenOrderInternal = Omit<RivenOrder, 'item'> & {
156
+ item: Omit<RivenOrder['item'], 'attributes'> & {
157
+ attributes: RivenAttributeShortInternal[];
158
+ };
159
+ };
160
+ }
161
+ declare module "warframe/types/wf/riven" {
162
+ import type { IWeapon } from 'warframe-public-export-plus';
163
+ import type { RivenAttributeUnit } from "warframe/types/wfm";
164
+ export type RivenWeaponType = 'Rifle' | 'Shotgun' | 'Pistol' | 'Archgun' | 'Melee';
165
+ export type RivenStatCountType = '31' | '2' | '21' | '3';
166
+ export interface RivenStatFixFactor {
167
+ buffFactor: number;
168
+ buffCount: number;
169
+ curseFactor: number;
170
+ curseCount: number;
171
+ }
172
+ export type RivenStatFixFactorMap = Record<RivenStatCountType, RivenStatFixFactor>;
173
+ export interface RivenStatAnalyzsis {
174
+ name: string;
175
+ unit: RivenAttributeUnit;
176
+ percent: number;
177
+ value: number;
178
+ max: number;
179
+ min: number;
180
+ }
181
+ export interface RivenStatAnalyzeResult {
182
+ name: string;
183
+ disposition: number;
184
+ buffs: RivenStatAnalyzsis[];
185
+ curses: RivenStatAnalyzsis[];
186
+ }
187
+ export interface RivenWeaponDisposition {
188
+ name: {
189
+ en: string;
190
+ zh: string;
191
+ };
192
+ calc: {
193
+ disposition: number;
194
+ name: string;
195
+ texture: string;
196
+ riventype: string;
197
+ };
198
+ weapon: IWeapon;
199
+ }
200
+ export interface RivenStatResult {
201
+ positive: Record<string, {
202
+ name: string;
203
+ max: number;
204
+ min: number;
205
+ unit: RivenAttributeUnit;
206
+ }>;
207
+ negative: Record<string, {
208
+ name: string;
209
+ max: number;
210
+ min: number;
211
+ unit: RivenAttributeUnit;
212
+ }> | undefined;
213
+ }
214
+ }
215
+ declare module "warframe/types/wf/voidtrader" {
216
+ export interface VoidTrader {
217
+ expiry: string;
218
+ items: VoidTraderItem[];
219
+ }
220
+ export interface VoidTraderItem {
221
+ name: string;
222
+ ducats: number;
223
+ credits: number;
224
+ }
225
+ }
226
+ declare module "warframe/types/wf/weekly" {
227
+ import type { WFRegionShort } from "warframe/types/wf/region";
228
+ export interface ArchonHunt {
229
+ name: string;
230
+ missions: ArchonHuntMissions[];
231
+ }
232
+ export interface ArchonHuntMissions {
233
+ type: string;
234
+ node: WFRegionShort;
235
+ }
236
+ export interface ArchiMedea {
237
+ name: string;
238
+ missions: ArchiMedeaMission[];
239
+ peronal: ArchiMedeaDebuff[];
240
+ }
241
+ export interface ArchiMedeaMission {
242
+ type: string;
243
+ deviation: ArchiMedeaDebuff;
244
+ risks: ArchiMedeaDebuff[];
245
+ }
246
+ export interface ArchiMedeaDebuff {
247
+ name: string;
248
+ desc: string;
249
+ }
250
+ }
251
+ declare module "warframe/types/index" {
252
+ export type { AsyncCache, AsyncCacheFactory } from "warframe/types/cache";
253
+ export type { RivenType, RivenWeaponItem, RivenWeaponResponse, WeaponGroup, } from "warframe/types/miscs/lab";
254
+ export type { OcrAPISecret } from "warframe/types/ocr";
255
+ export type { WarframeError, WarframeErrorCode, WarframeErrorParams, WarframeFailure, WarframeResult, } from "warframe/types/warframe-result";
256
+ export type { Arbitration, ArbitrationShort } from "warframe/types/wf/arbitration";
257
+ export type { Fissure } from "warframe/types/wf/fissure";
258
+ export type { WFRegion, WFRegionShort } from "warframe/types/wf/region";
259
+ export type { ExternalRelic, ExternalRelicReward, OutputRelic, OutputRelicReward, Relic, RelicQuality, RelicReward, RelicRewardRarity, RelicTier, } from "warframe/types/wf/relic";
260
+ export type { RivenStatAnalyzeResult, RivenStatAnalyzsis, RivenStatCountType, RivenStatFixFactor, RivenStatFixFactorMap, RivenStatResult, RivenWeaponDisposition, RivenWeaponType, } from "warframe/types/wf/riven";
261
+ export type { VoidTrader, VoidTraderItem } from "warframe/types/wf/voidtrader";
262
+ export type { ArchiMedea, ArchiMedeaDebuff, ArchiMedeaMission, ArchonHunt, ArchonHuntMissions, } from "warframe/types/wf/weekly";
263
+ export type { Ducatnator, ItemShort, OrderWithUser, PrimedModHistoryItem, RivenAttribute, RivenAttributeShortInternal, RivenAttributeUnit, RivenItem, RivenOrder, RivenOrderInternal, StatisticsCollection, WFMLang, } from "warframe/types/wfm";
264
+ }
20
265
  declare module "warframe/utils/assets" {
21
266
  export function loadAssetJson<T>(path: string): T;
22
267
  export function loadAssetText(path: string): string;
@@ -28,6 +273,7 @@ declare module "warframe/utils/cache" {
28
273
  * @param ttlMs Time-to-live in milliseconds. Defaults to 60_000 meaning 1 minute. Set to -1 for infinity duration.
29
274
  * @returns A cache instance.
30
275
  */
276
+ import type { AsyncCache, AsyncCacheFactory } from "warframe/types/index";
31
277
  export function createAsyncCache<T>(factory: AsyncCacheFactory<T>, ttlMs?: number): AsyncCache<T>;
32
278
  }
33
279
  declare module "warframe/utils/collection" {
@@ -77,25 +323,18 @@ declare module "warframe/utils/index" {
77
323
  export * from "warframe/utils/time";
78
324
  }
79
325
  declare module "warframe/infrastructure/miscs/lab-api" {
80
- import type { RivenWeaponItem } from '../../types/miscs/lab';
326
+ import type { RivenWeaponItem } from "warframe/types/index";
81
327
  export function getHotRivenWeapons(num?: number): Promise<RivenWeaponItem[] | undefined>;
82
328
  }
83
329
  declare module "warframe/data/miscs/lab" {
84
- export const globalHotRivenWeapons: AsyncCache<import("warframe").RivenWeaponItem[]>;
330
+ export const globalHotRivenWeapons: import("warframe").AsyncCache<import("warframe").RivenWeaponItem[]>;
85
331
  }
86
332
  declare module "warframe/services/miscs-service" {
87
- import type { RivenWeaponItem } from '../types/miscs/lab';
88
- import type { WarframeResult } from "warframe/types/warframe-result";
333
+ import type { RivenWeaponItem, WarframeResult } from "warframe/types/index";
89
334
  export function getHotRivenWeapons(): Promise<WarframeResult<RivenWeaponItem[]>>;
90
335
  }
91
- declare module "warframe/types/ocr" {
92
- export interface OcrAPISecret {
93
- id: string;
94
- key: string;
95
- }
96
- }
97
336
  declare module "warframe/assets/index" {
98
- import type { RivenWeaponDisposition } from '../types/wf/riven';
337
+ import type { RivenWeaponDisposition } from "warframe/types/index";
99
338
  export interface BaroParsedItem {
100
339
  name: string;
101
340
  last: string;
@@ -116,6 +355,7 @@ declare module "warframe/assets/index" {
116
355
  export const warframeAlias: Record<string, string[]>;
117
356
  }
118
357
  declare module "warframe/data/wf/arbitrationSchedule" {
358
+ import type { ArbitrationShort } from "warframe/types/index";
119
359
  export const arbitrationSchedule: ArbitrationShort[];
120
360
  }
121
361
  declare module "warframe/infrastructure/wf/wf-api" {
@@ -139,6 +379,7 @@ declare module "warframe/infrastructure/wf/wf-api" {
139
379
  }
140
380
  declare module "warframe/infrastructure/wf/wf-export-adapter" {
141
381
  import type { IRegion } from 'warframe-public-export-plus';
382
+ import type { RelicQuality, WFRegionShort } from "warframe/types/index";
142
383
  export function regionToShort(region: IRegion, dict: Record<string, string>): WFRegionShort;
143
384
  export function relicQualityToName(quality: string): RelicQuality;
144
385
  /**
@@ -159,6 +400,7 @@ declare module "warframe/infrastructure/wf/wf-export-adapter" {
159
400
  }
160
401
  declare module "warframe/infrastructure/wf/wfcd-adapter" {
161
402
  import type { TMissionType } from 'warframe-public-export-plus';
403
+ import type { VoidTraderItem } from "warframe/types/index";
162
404
  export function getSolNodeKey(name: string): Promise<string>;
163
405
  export function getMissionTypeKey(name: string): Promise<TMissionType>;
164
406
  export const fissureTierName: {
@@ -179,25 +421,30 @@ declare module "warframe/infrastructure/wf/wfcd-adapter" {
179
421
  }): VoidTraderItem;
180
422
  }
181
423
  declare module "warframe/data/wf/globalWorldState" {
182
- export const globalWorldState: AsyncCache<{
183
- raw: import("warframe-worldstate-parser").WorldState;
424
+ import type WorldState from 'warframe-worldstate-parser';
425
+ import type { Fissure } from "warframe/types/index";
426
+ type ParsedFissure = WorldState['fissures'][number];
427
+ export function adaptFissure(fissure: ParsedFissure): Promise<Fissure>;
428
+ export const globalWorldState: import("warframe").AsyncCache<{
429
+ raw: WorldState;
184
430
  fissures: Fissure[];
185
431
  spFissures: Fissure[];
186
432
  rjFissures: Fissure[];
187
433
  }>;
188
434
  }
189
435
  declare module "warframe/data/wf/relics" {
436
+ import type { Relic } from "warframe/types/index";
190
437
  export const relics: Record<string, Relic>;
191
438
  }
192
439
  declare module "warframe/data/wf/rivenBaseValues" {
193
440
  export const rivenAttrValueDict: Record<string, Record<string, number>>;
194
441
  }
195
442
  declare module "warframe/data/wf/rivenDisposition" {
196
- import type { RivenWeaponDisposition } from '../../types/wf/riven';
443
+ import type { RivenWeaponDisposition } from "warframe/types/index";
197
444
  export const weaponRivenDispositionDict: Record<string, RivenWeaponDisposition>;
198
445
  }
199
446
  declare module "warframe/data/wf/rivenStatData" {
200
- import type { RivenStatFixFactorMap } from '../../types/wf/riven';
447
+ import type { RivenStatFixFactorMap } from "warframe/types/index";
201
448
  export const rivenStatFixFactor: RivenStatFixFactorMap;
202
449
  }
203
450
  declare module "warframe/infrastructure/wfm-client" {
@@ -221,7 +468,7 @@ declare module "warframe/infrastructure/wfm-client" {
221
468
  };
222
469
  }
223
470
  declare module "warframe/data/wfm/globalRivenAttribute" {
224
- import type { RivenAttribute } from '../../types/wfm';
471
+ import type { AsyncCache, RivenAttribute } from "warframe/types/index";
225
472
  export function globalRivenAttributeFactory(rivenAttributeData?: RivenAttribute[]): Promise<{
226
473
  globalRivenAttributeList: RivenAttribute[];
227
474
  globalRivenAttributeDict: Record<string, RivenAttribute>;
@@ -238,7 +485,7 @@ declare module "warframe/data/wfm/globalRivenAttribute" {
238
485
  }>): void;
239
486
  }
240
487
  declare module "warframe/data/wfm/globalRivenItem" {
241
- import type { RivenItem } from '../../types/wfm';
488
+ import type { RivenItem } from "warframe/types/index";
242
489
  export interface GlobalRivenItemWordPrefixCandidate {
243
490
  item: RivenItem;
244
491
  normalizedName: string;
@@ -250,7 +497,7 @@ declare module "warframe/data/wfm/globalRivenItem" {
250
497
  globalRivenItemNameToSlugDict: Record<string, string>;
251
498
  globalRivenItemWordPrefixCandidates: GlobalRivenItemWordPrefixCandidate[];
252
499
  }>;
253
- export const globalRivenItemData: AsyncCache<{
500
+ export const globalRivenItemData: import("warframe").AsyncCache<{
254
501
  globalRivenItemList: RivenItem[];
255
502
  globalRivenItemDict: Record<string, RivenItem>;
256
503
  globalRivenItemNameToSlugDict: Record<string, string>;
@@ -258,15 +505,12 @@ declare module "warframe/data/wfm/globalRivenItem" {
258
505
  }>;
259
506
  }
260
507
  declare module "warframe/infrastructure/ocr-api" {
261
- import type { OcrAPISecret } from "warframe/types/ocr";
508
+ import type { OcrAPISecret } from "warframe/types/index";
262
509
  export function extractTextFromImage(image: string | Blob, secret: OcrAPISecret): Promise<string[] | undefined>;
263
510
  }
264
511
  declare module "warframe/services/wf-service" {
265
512
  import type { WeeklyRiven } from 'warframe-weekly-rivens';
266
- import type { OcrAPISecret } from "warframe/types/ocr";
267
- import type { WarframeResult } from "warframe/types/warframe-result";
268
- import type { RivenStatAnalyzeResult, RivenStatResult } from '../types/wf/riven';
269
- import type { RivenAttribute } from '../types/wfm';
513
+ import type { Arbitration, ArchiMedea, ArchonHunt, Fissure, OcrAPISecret, Relic, RivenAttribute, RivenStatAnalyzeResult, RivenStatResult, VoidTrader, WarframeResult } from "warframe/types/index";
270
514
  import { weaponRivenDispositionDict } from "warframe/data/wf/rivenDisposition";
271
515
  export function getRelic(input: string): Promise<WarframeResult<Relic>>;
272
516
  export function getArbitrations(day?: number): WarframeResult<Arbitration[]>;
@@ -309,10 +553,10 @@ declare module "warframe/services/wf-service" {
309
553
  }): WarframeResult<RivenStatAnalyzeResult>;
310
554
  }
311
555
  declare module "warframe/data/wfm/globalDucatnator" {
312
- export const globalDucatnatorIDDict: AsyncCache<Record<string, import("wfm-api-client").Ducatnator> | undefined>;
556
+ export const globalDucatnatorIDDict: import("warframe").AsyncCache<Record<string, import("wfm-api-client").Ducatnator> | undefined>;
313
557
  }
314
558
  declare module "warframe/data/wfm/globalItem" {
315
- import type { ItemShort } from '../../types/wfm';
559
+ import type { AsyncCache, ItemShort } from "warframe/types/index";
316
560
  export interface GlobalItemWordPrefixCandidate {
317
561
  item: ItemShort;
318
562
  normalizedName: string;
@@ -342,7 +586,7 @@ declare module "warframe/data/wfm/globalItem" {
342
586
  }
343
587
  declare module "warframe/services/wfm-service/wfm-service.item-matcher" {
344
588
  import type { GlobalItemWordPrefixCandidate } from "warframe/data/wfm/globalItem";
345
- import type { ItemShort } from '../../types/wfm';
589
+ import type { ItemShort } from "warframe/types/index";
346
590
  interface WFMItemLookupData {
347
591
  globalItemDict: Record<string, ItemShort>;
348
592
  globalItemNameToSlugDict: Record<string, string>;
@@ -384,7 +628,7 @@ declare module "warframe/services/wfm-service/wfm-service.item-matcher" {
384
628
  }
385
629
  declare module "warframe/services/wfm-service/wfm-service.riven-item-matcher" {
386
630
  import type { GlobalRivenItemWordPrefixCandidate } from "warframe/data/wfm/globalRivenItem";
387
- import type { RivenItem } from '../../types/wfm';
631
+ import type { RivenItem } from "warframe/types/index";
388
632
  interface WFMRivenItemLookupData {
389
633
  globalRivenItemDict: Record<string, RivenItem>;
390
634
  globalRivenItemNameToSlugDict: Record<string, string>;
@@ -400,8 +644,7 @@ declare module "warframe/services/wfm-service/wfm-service.riven-item-matcher" {
400
644
  export const stringToWFMItem: typeof findRivenItemByName;
401
645
  }
402
646
  declare module "warframe/services/wfm-service/index" {
403
- import type { WarframeResult } from "warframe/types/warframe-result";
404
- import type { ItemShort, OrderWithUser, PrimedModHistoryItem, RivenItem, RivenOrderInternal } from '../../types/wfm';
647
+ import type { ItemShort, OrderWithUser, OutputRelic, PrimedModHistoryItem, Relic, RivenItem, RivenOrderInternal, WarframeResult } from "warframe/types/index";
405
648
  import { stringToWFMItem } from "warframe/services/wfm-service/wfm-service.item-matcher";
406
649
  export { stringToWFMItem };
407
650
  export function updateCache(): Promise<string>;
@@ -414,29 +657,64 @@ declare module "warframe/services/wfm-service/index" {
414
657
  orders: RivenOrderInternal[];
415
658
  }>>;
416
659
  export function applyRelicData(relic: Relic): Promise<OutputRelic>;
417
- export const primedModHistory: AsyncCache<PrimedModHistoryItem[]>;
660
+ export const primedModHistory: import("warframe").AsyncCache<PrimedModHistoryItem[]>;
661
+ }
662
+ declare module "warframe/services/world-state-refresh" {
663
+ import type { WFRegionShort } from "warframe/types/index";
664
+ import { globalWorldState } from "warframe/data/wf/globalWorldState";
665
+ export type WorldStateSnapshot = Awaited<ReturnType<typeof globalWorldState.get>>;
666
+ export type WorldStateNotification = {
667
+ type: 'fissure';
668
+ id: string;
669
+ tier: string;
670
+ tierNum: number;
671
+ node: WFRegionShort;
672
+ hard: boolean;
673
+ category: 'normal' | 'steel-path' | 'railjack';
674
+ expiry: number;
675
+ } | {
676
+ type: 'void-trader';
677
+ id: string;
678
+ character: string;
679
+ location: string;
680
+ expiry: number;
681
+ } | {
682
+ type: 'daily-deal';
683
+ id: string;
684
+ item: string;
685
+ originalPrice: number;
686
+ salePrice: number;
687
+ discount: number;
688
+ expiry: number;
689
+ } | {
690
+ type: 'alert';
691
+ id: string;
692
+ description: string;
693
+ node: string;
694
+ missionType: string;
695
+ reward: string;
696
+ expiry: number;
697
+ };
698
+ export function diffWorldStates(previous: WorldStateSnapshot, current: WorldStateSnapshot): Promise<WorldStateNotification[]>;
699
+ export interface WorldStateSource {
700
+ update: () => Promise<WorldStateSnapshot>;
701
+ }
702
+ export function createWorldStateRefresher(source?: WorldStateSource): () => Promise<WorldStateNotification[]>;
703
+ export const refreshWorldState: () => Promise<WorldStateNotification[]>;
418
704
  }
419
705
  declare module "warframe/services/index" {
420
706
  export * from "warframe/services/miscs-service";
421
707
  export * from "warframe/services/wf-service";
422
708
  export * from "warframe/services/wfm-service/index";
709
+ export * from "warframe/services/world-state-refresh";
423
710
  }
424
711
  declare module "warframe/index" {
425
712
  export * from "warframe/services/index";
426
- export type { RivenWeaponItem } from './types/miscs/lab';
427
- export type { OcrAPISecret } from "warframe/types/ocr";
713
+ export type * from "warframe/types/index";
428
714
  export { failure } from "warframe/types/warframe-result";
429
- export type { WarframeError, WarframeErrorCode, WarframeErrorParams, WarframeFailure, WarframeResult, } from "warframe/types/warframe-result";
430
- export type { RivenStatAnalyzeResult, RivenStatResult, } from './types/wf/riven';
431
- export type { ItemShort, OrderWithUser, PrimedModHistoryItem, RivenAttributeShortInternal, RivenAttributeUnit, RivenItem, RivenOrderInternal, } from './types/wfm';
432
715
  export { msToHumanReadable } from "warframe/utils/time";
433
716
  }
434
- declare module "components/miscs" {
435
- import type { Element } from 'koishi';
436
- import type { RivenWeaponItem } from "warframe/index";
437
- export function HotRivenComponent(data: RivenWeaponItem[]): Element;
438
- }
439
- declare module "messages" {
717
+ declare module "i18n" {
440
718
  import type { WarframeFailure } from "warframe/index";
441
719
  export const messages: {
442
720
  readonly 'common.fetchFailed': "内部错误,获取最新信息失败";
@@ -472,6 +750,11 @@ declare module "messages" {
472
750
  export function t(message: MessageKey, params?: MessageParams): string;
473
751
  export function t(result: WarframeFailure): string;
474
752
  }
753
+ declare module "components/miscs" {
754
+ import type { Element } from 'koishi';
755
+ import type { RivenWeaponItem } from "warframe/index";
756
+ export function HotRivenComponent(data: RivenWeaponItem[]): Element;
757
+ }
475
758
  declare module "commands/miscs" {
476
759
  import type { PluginDependencies } from '../types/config';
477
760
  export function inDevelopment(): string;
@@ -500,7 +783,7 @@ declare module "utils/index" {
500
783
  declare module "components/wf" {
501
784
  import type { Element } from 'koishi';
502
785
  import type { WeeklyRiven } from 'warframe-weekly-rivens';
503
- import type { RivenStatAnalyzeResult, RivenStatResult } from "warframe/index";
786
+ import type { Arbitration, ArchiMedea, ArchonHunt, Fissure, OutputRelic, RivenStatAnalyzeResult, RivenStatResult, VoidTrader } from "warframe/index";
504
787
  export function ArbitrationComponent(arbi: Arbitration[]): Element;
505
788
  export function CircuitComponent(currentIncarnons: number, currentWarframes: number, allIncarnons: string[][], allWarframes: string[][]): Element;
506
789
  export function FissureComponent(fissures: Fissure[], type: 'fissure' | 'sp-fissure' | 'rj-fissure'): Element;
@@ -558,9 +841,37 @@ declare module "commands/wfm" {
558
841
  };
559
842
  }
560
843
  declare module "commands/index" {
561
- export * from "commands/miscs";
562
- export * from "commands/wf";
563
- export * from "commands/wfm";
844
+ import type { Context } from 'koishi';
845
+ import type { PluginDependencies } from '../types/config';
846
+ export function setupCommands(ctx: Context, deps: PluginDependencies): void;
847
+ }
848
+ declare module "hooks/index" {
849
+ import type { Context } from 'koishi';
850
+ import type { PluginDependencies } from '../types/config';
851
+ export function setupHooks(ctx: Context, deps: PluginDependencies): void;
852
+ }
853
+ declare module "schedules/pmod-history" {
854
+ import type { Context } from 'koishi';
855
+ import type { PluginDependencies } from '../types/config';
856
+ type Refresh = () => Promise<unknown>;
857
+ export function setupPrimedModHistorySchedule(ctx: Context, deps: PluginDependencies, refresh?: Refresh): void;
858
+ }
859
+ declare module "messages/world-state" {
860
+ import type { Element } from 'koishi';
861
+ import type { WorldStateNotification } from "warframe/index";
862
+ export function createWorldStateMessages(items: WorldStateNotification[]): Promise<Element[]>;
863
+ }
864
+ declare module "schedules/world-state" {
865
+ import type { Context } from 'koishi';
866
+ import type { PluginDependencies } from '../types/config';
867
+ import type { WorldStateNotification } from "warframe/index";
868
+ type Refresh = () => Promise<WorldStateNotification[]>;
869
+ export function setupWorldStateSchedule(ctx: Context, deps: PluginDependencies, refresh?: Refresh): void;
870
+ }
871
+ declare module "schedules/index" {
872
+ import type { Context } from 'koishi';
873
+ import type { PluginDependencies } from '../types/config';
874
+ export function setupSchedules(ctx: Context, deps: PluginDependencies): void;
564
875
  }
565
876
  declare module "index" {
566
877
  import type { Context } from 'koishi';
@@ -574,7 +885,3 @@ declare module "index" {
574
885
  export const Config: Schema<PluginConfig>;
575
886
  export function apply(ctx: Context): void;
576
887
  }
577
- declare module "warframe/types/result" {
578
- export { failure, type WarframeError, type WarframeErrorCode, type WarframeErrorParams, type WarframeFailure, type WarframeResult, } from "warframe/types/warframe-result";
579
- export type { WarframeResult as ServiceResult } from "warframe/types/warframe-result";
580
- }