koishi-plugin-warframe 0.0.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 ADDED
@@ -0,0 +1,91 @@
1
+ import Puppeteer from 'koishi-plugin-puppeteer';
2
+ import Element from '@satorijs/element';
3
+ import { Element, Argv, Context, Schema } from 'koishi';
4
+ export const fetchAsyncData: <T>(url: string, method?: string) => Promise<T | null>;
5
+ export const toTimeStamp: (timeStr: string) => number;
6
+ /**
7
+ * 毫秒转「X小时X分钟X秒」格式(0单位不显示)
8
+ * @param {number} ms - 待转换的毫秒数(非负)
9
+ * @returns {string} 示例:3661000ms → "1小时1分钟1秒";61000ms → "1分钟1秒";500ms → "0秒"
10
+ */
11
+ export const msToHumanReadable: (ms: number) => string;
12
+ export const fullWidthToHalfWidth: (str: string) => string;
13
+ export const getWFMItemList: () => Promise<WFMResponse<ItemShort[] | null>>;
14
+ export const getWFMOrderList: (itemId: string) => Promise<WFMResponse<OrderWithUser[] | null>>;
15
+ export const getWFMRivenItemList: () => Promise<WFMResponse<RivenItem[] | null>>;
16
+ export const getWFMRivenOrderList: (itemId: string) => Promise<WFMResponseV1<RivenOrder> | null>;
17
+ export const getWFMRivenAttributeList: () => Promise<WFMResponse<RivenAttribute[]> | null>;
18
+ export const getHtmlString: (body: string, title?: string) => string;
19
+ export const getHtmlImageBase64: (puppe: Puppeteer, html: string, type?: "png" | "jpeg" | "webp") => Promise<string>;
20
+ export const OutputImage: (imgBase64: string) => Element;
21
+ export const ItemOrderOutput: (item: ItemShort, orders: OrderWithUser[]) => Element;
22
+ export const RivenOrderOutput: (item: RivenItem, orders: RivenOrder[]) => Element;
23
+ let globalRivenAttributeList: RivenAttribute[];
24
+ export { globalRivenAttributeList };
25
+ export const wmOnReady: () => Promise<void>;
26
+ export const getItemOrders: (itemName: string) => Promise<{
27
+ item: ItemShort;
28
+ orders: OrderWithUser[];
29
+ }>;
30
+ export const generateItemOrderOutput: (puppe: Puppeteer, item: ItemShort, orders: OrderWithUser[]) => Promise<import("koishi").Element>;
31
+ export const getRivenOrders: (input: string) => Promise<{
32
+ item: RivenItem;
33
+ orders: RivenOrder[];
34
+ }>;
35
+ export const generateRivenOrderOutput: (puppe: Puppeteer, item: RivenItem, orders: RivenOrder[]) => Promise<import("koishi").Element>;
36
+ declare const _default: {
37
+ SolNode147: number;
38
+ SolNode149: number;
39
+ ClanNode22: number;
40
+ SolNode224: number;
41
+ SolNode130: number;
42
+ SolNode195: number;
43
+ SolNode42: number;
44
+ ClanNode24: number;
45
+ };
46
+ declare const arbys: string;
47
+ export const ArbiTable: (arbi: Arby[]) => Element;
48
+ export const CircuitTable: (incarnons: string[], warframes: string[]) => Element;
49
+ export const FissureTable: (fissures: Fissure[], type: "fissure" | "sp-fissure" | "rj-fissure") => Element;
50
+ export const incarnonRewards: string[][];
51
+ export const warframeRewards: string[][];
52
+ export const getWorldState: () => Promise<WorldState>;
53
+ export const regionToShort: (region: WFRegion, dict: any) => {
54
+ name: any;
55
+ system: any;
56
+ type: any;
57
+ faction: any;
58
+ maxLevel: number;
59
+ minLevel: number;
60
+ };
61
+ export const getArbysWeek: (day?: number) => Arby[] | string;
62
+ export const generateArbyWeekOutput: (puppe: Puppeteer, arby: Arby[]) => Promise<import("koishi").Element>;
63
+ export const getCircuitWeek: () => {
64
+ incarnons: string[];
65
+ warframes: string[];
66
+ };
67
+ export const generateCircuitWeekOutput: (puppe: Puppeteer, data: {
68
+ incarnons: string[];
69
+ warframes: string[];
70
+ }) => Promise<import("koishi").Element>;
71
+ export const updateFissues: () => Promise<boolean>;
72
+ export const getFissures: () => Promise<Fissure[] | "内部错误,获取最新信息失败">;
73
+ export const getSteelPathFissures: () => Promise<Fissure[] | "内部错误,获取最新信息失败">;
74
+ export const getRailjackFissures: () => Promise<Fissure[] | "内部错误,获取最新信息失败">;
75
+ export const generateFissureOutput: (puppe: Puppeteer, fissures: Fissure[], type: "fissure" | "sp-fissure" | "rj-fissure") => Promise<import("koishi").Element>;
76
+ export const wmCommand: (action: Argv, input: string) => Promise<string | import("koishi").Element>;
77
+ export const wmrCommand: (action: Argv, input: string) => Promise<string | import("koishi").Element>;
78
+ export const aboutCommand: () => string;
79
+ export const timeCommand: (_: never, region?: string) => string;
80
+ export const arbyCommand: (action: Argv, input?: number) => string | Promise<import("koishi").Element>;
81
+ export const fissureCommand: (action: Argv) => Promise<import("koishi").Element | "内部错误,获取最新信息失败" | "内部错误">;
82
+ export const steelPathFissureCommand: (action: Argv) => Promise<import("koishi").Element | "内部错误,获取最新信息失败" | "内部错误">;
83
+ export const railjackFissureCommand: (action: Argv) => Promise<import("koishi").Element | "内部错误,获取最新信息失败" | "内部错误">;
84
+ export const circuitCommand: (action: Argv) => Promise<import("koishi").Element>;
85
+ export const onReadyHandler: () => void;
86
+ export const name = "warframe";
87
+ export interface Config {
88
+ developerMode: boolean;
89
+ }
90
+ export const Config: Schema<Config>;
91
+ export function apply(ctx: Context): void;