koishi-plugin-warframe 1.1.1 → 1.2.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.
Files changed (3) hide show
  1. package/lib/index.d.ts +27 -3
  2. package/lib/index.js +1022 -20
  3. package/package.json +9 -2
package/lib/index.d.ts CHANGED
@@ -2,9 +2,11 @@ import { IRegion } from 'warframe-public-export-plus';
2
2
  import Puppeteer from 'koishi-plugin-puppeteer';
3
3
  import Element from '@satorijs/element';
4
4
  import { Element, Argv, Context, Schema } from 'koishi';
5
+ import WorldState from 'warframe-worldstate-parser';
5
6
  export const fetchAsyncText: (url: string, method?: string) => Promise<string | null>;
6
7
  export const fetchAsyncData: <T>(url: string, method?: string) => Promise<T | null>;
7
8
  export const fullWidthToHalfWidth: (str: string) => string;
9
+ export const removeSpace: (text: string) => string;
8
10
  export const listToDict: <T>(dict: T[], predict: (obj: T) => string[]) => {
9
11
  [key: string]: T;
10
12
  };
@@ -24,6 +26,7 @@ export const toTimeStamp: (timeStr: string) => number;
24
26
  */
25
27
  export const msToHumanReadable: (ms: number) => string;
26
28
  export const getSolNodeKey: (name: string) => Promise<string>;
29
+ export const getMissionTypeKey: (name: string) => Promise<string>;
27
30
  export const fissureTierName: {
28
31
  1: string;
29
32
  2: string;
@@ -54,6 +57,9 @@ export const ItemOrderOutput: (item: ItemShort, orders: OrderWithUser[]) => Elem
54
57
  export const RivenOrderOutput: (item: RivenItem, orders: RivenOrder[]) => Element;
55
58
  export let globalRivenAttributeDict: Record<string, RivenAttribute>;
56
59
  export const wmOnReady: () => Promise<void>;
60
+ export const setGlobalItem: (data: ItemShort[]) => void;
61
+ export const setGlobalRivenItem: (data: RivenItem[]) => void;
62
+ export const setGlobalRivenAttribute: (data: RivenAttribute[]) => void;
57
63
  export const getItemOrders: (input: string) => Promise<{
58
64
  item: ItemShort;
59
65
  orders: OrderWithUser[];
@@ -64,6 +70,8 @@ export const getRivenOrders: (input: string) => Promise<{
64
70
  orders: RivenOrder[];
65
71
  }>;
66
72
  export const generateRivenOrderOutput: (puppe: Puppeteer, item: RivenItem, orders: RivenOrder[]) => Promise<import("koishi").Element>;
73
+ export const loadRelicData: (relic: Relic) => OutputRelic;
74
+ export const inputToItem: (input: string) => ItemShort | undefined;
67
75
  declare const _default: {
68
76
  SolNode147: number;
69
77
  SolNode149: number;
@@ -80,9 +88,22 @@ export const warframeRewards: string[][];
80
88
  export const ArbitrationTable: (arbi: Arbitration[]) => Element;
81
89
  export const CircuitTable: (incarnons: string[], warframes: string[]) => Element;
82
90
  export const FissureTable: (fissures: Fissure[], type: "fissure" | "sp-fissure" | "rj-fissure") => Element;
83
- export const getWorldState: () => Promise<any>;
91
+ export const WeeklyTable: (archon: string, deepArchimedea: ArchiMedea, temporalArchimedea: ArchiMedea) => Promise<string>;
92
+ export const RelicComponent: (relic: OutputRelic) => Element;
93
+ export const getWorldState: () => Promise<WorldState>;
94
+ export const getRelicsDropTable: (puppe: Puppeteer) => Promise<Record<string, Relic>>;
95
+ export const wfOnReady: () => Promise<void>;
96
+ export const getRelic: (puppe: Puppeteer, input: string) => Promise<Relic | string>;
97
+ export const generateRelicOutput: (puppe: Puppeteer, relic: OutputRelic) => Promise<import("koishi").Element>;
84
98
  export const getArbitrations: (day?: number) => Arbitration[] | string;
85
99
  export const generateArbitrationsOutput: (puppe: Puppeteer, arby: Arbitration[]) => Promise<import("koishi").Element>;
100
+ export const getWeekly: () => Promise<"内部错误,获取最新信息失败" | {
101
+ archonHunt: string;
102
+ deepArchimedea: ArchiMedea;
103
+ temporalArchimedea: ArchiMedea;
104
+ }>;
105
+ export const generateWeeklyOutput: (puppe: Puppeteer, archon: string, deepArchimedea: ArchiMedea, temporalArchimedea: ArchiMedea) => Promise<string>;
106
+ export const getRegionTime: () => Promise<string>;
86
107
  export const getCircuitWeek: () => {
87
108
  incarnons: string[];
88
109
  warframes: string[];
@@ -97,13 +118,16 @@ export const getRailjackFissures: () => Promise<Fissure[] | "内部错误,获
97
118
  export const generateFissureOutput: (puppe: Puppeteer, fissures: Fissure[], type: "fissure" | "sp-fissure" | "rj-fissure") => Promise<import("koishi").Element>;
98
119
  export const wmCommand: (action: Argv, input: string) => Promise<string | import("koishi").Element>;
99
120
  export const wmrCommand: (action: Argv, input: string) => Promise<string | import("koishi").Element>;
100
- export const aboutCommand: () => string;
121
+ export const aboutCommand: (action: Argv) => Promise<string>;
101
122
  export const arbitrationCommand: (action: Argv, input?: number) => string | Promise<import("koishi").Element>;
102
123
  export const fissureCommand: (action: Argv) => Promise<import("koishi").Element | "内部错误,获取最新信息失败" | "内部错误">;
103
124
  export const steelPathFissureCommand: (action: Argv) => Promise<import("koishi").Element | "内部错误,获取最新信息失败" | "内部错误">;
104
125
  export const railjackFissureCommand: (action: Argv) => Promise<import("koishi").Element | "内部错误,获取最新信息失败" | "内部错误">;
105
126
  export const circuitCommand: (action: Argv) => Promise<import("koishi").Element>;
106
- export const onReadyHandler: () => void;
127
+ export const environmentCommand: () => Promise<string>;
128
+ export const weeklyCommand: (action: Argv) => Promise<string>;
129
+ export const relicCommand: (action: Argv, input: string) => Promise<string | import("koishi").Element>;
130
+ export const onReadyHandler: () => Promise<void>;
107
131
  export const name = "warframe";
108
132
  export interface Config {
109
133
  developerMode: boolean;