koishi-plugin-warframe 0.0.2 → 0.0.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/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # koishi-plugin-warframe
2
+
3
+ [![npm](https://img.shields.io/npm/v/koishi-plugin-warframe?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-warframe)
4
+
5
+ Toolkit for warframe. **(In development)**
6
+
7
+ ## Commands
8
+
9
+ | Command Name | Default Alias | Description |
10
+ | ------------------------ | ---------------------- | ------------------------------------------------------------------------------------------- |
11
+ | wmi | | Warframe market orders. |
12
+ | wmr | | Warframe market orders. |
13
+ | arbitration [day:number] | arbi, 仲裁, 仲裁表 | High-value arbitration schedule. The arg decide how long in days to display, defaults to 3. |
14
+ | fissure | 裂缝, 裂隙 | Current fissures. |
15
+ | spfissure | 钢铁裂缝, 钢铁裂隙 | Current steelpath fissures. |
16
+ | rjfissure | 九重天裂缝, 九重天裂隙 | Current railjack fissures. |
17
+ | circuit | 灵化, 灵化之源 | Weekly rewards of circuit, both warframe parts and incarnons. |
18
+ | about | 关于 | About information. |
19
+
20
+ ## Install
21
+
22
+ Search `koishi-plugin-warframe` in koishi dependency manager, not in plugin market.
package/lib/index.d.ts CHANGED
@@ -1,7 +1,18 @@
1
+ import { IRegion } from 'warframe-public-export-plus';
1
2
  import Puppeteer from 'koishi-plugin-puppeteer';
2
3
  import Element from '@satorijs/element';
3
4
  import { Element, Argv, Context, Schema } from 'koishi';
5
+ export const fetchAsyncText: (url: string, method?: string) => Promise<string | null>;
4
6
  export const fetchAsyncData: <T>(url: string, method?: string) => Promise<T | null>;
7
+ export const fullWidthToHalfWidth: (str: string) => string;
8
+ export const transformListIntoDict: <T>(dict: T[], predict: (obj: T) => string[]) => {
9
+ [key: string]: T;
10
+ };
11
+ export const dictToKeyDict: <T>(dict: {
12
+ [key: string]: T;
13
+ }, predict: (obj: T) => string[]) => {
14
+ [key: string]: string;
15
+ };
5
16
  export const toTimeStamp: (timeStr: string) => number;
6
17
  /**
7
18
  * 毫秒转「X小时X分钟X秒」格式(0单位不显示)
@@ -9,7 +20,25 @@ export const toTimeStamp: (timeStr: string) => number;
9
20
  * @returns {string} 示例:3661000ms → "1小时1分钟1秒";61000ms → "1分钟1秒";500ms → "0秒"
10
21
  */
11
22
  export const msToHumanReadable: (ms: number) => string;
12
- export const fullWidthToHalfWidth: (str: string) => string;
23
+ export const getSolNodeKey: (name: string) => Promise<string>;
24
+ export const fissureTierName: {
25
+ 1: string;
26
+ 2: string;
27
+ 3: string;
28
+ 4: string;
29
+ 5: string;
30
+ 6: string;
31
+ 7: string;
32
+ };
33
+ export const fissureTierNumToNumber: (a: number | string) => number;
34
+ export const regionToShort: (region: IRegion, dict: any) => {
35
+ name: any;
36
+ system: any;
37
+ type: any;
38
+ faction: any;
39
+ maxLevel: number;
40
+ minLevel: number;
41
+ };
13
42
  export const getWFMItemList: () => Promise<WFMResponse<ItemShort[] | null>>;
14
43
  export const getWFMOrderList: (itemId: string) => Promise<WFMResponse<OrderWithUser[] | null>>;
15
44
  export const getWFMRivenItemList: () => Promise<WFMResponse<RivenItem[] | null>>;
@@ -20,8 +49,9 @@ export const getHtmlImageBase64: (puppe: Puppeteer, html: string, type?: "png" |
20
49
  export const OutputImage: (imgBase64: string) => Element;
21
50
  export const ItemOrderOutput: (item: ItemShort, orders: OrderWithUser[]) => Element;
22
51
  export const RivenOrderOutput: (item: RivenItem, orders: RivenOrder[]) => Element;
23
- let globalRivenAttributeList: RivenAttribute[];
24
- export { globalRivenAttributeList };
52
+ export var globalRivenAttributeDict: {
53
+ [key: string]: RivenAttribute;
54
+ };
25
55
  export const wmOnReady: () => Promise<void>;
26
56
  export const getItemOrders: (itemName: string) => Promise<{
27
57
  item: ItemShort;
@@ -44,22 +74,14 @@ declare const _default: {
44
74
  ClanNode24: number;
45
75
  };
46
76
  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
77
  export const incarnonRewards: string[][];
51
78
  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>;
79
+ export const ArbitrationTable: (arbi: Arbitration[]) => Element;
80
+ export const CircuitTable: (incarnons: string[], warframes: string[]) => Element;
81
+ export const FissureTable: (fissures: Fissure[], type: "fissure" | "sp-fissure" | "rj-fissure") => Element;
82
+ export const getWorldState: () => Promise<any>;
83
+ export const getArbitrations: (day?: number) => Arbitration[] | string;
84
+ export const generateArbitrationsOutput: (puppe: Puppeteer, arby: Arbitration[]) => Promise<import("koishi").Element>;
63
85
  export const getCircuitWeek: () => {
64
86
  incarnons: string[];
65
87
  warframes: string[];
@@ -68,7 +90,6 @@ export const generateCircuitWeekOutput: (puppe: Puppeteer, data: {
68
90
  incarnons: string[];
69
91
  warframes: string[];
70
92
  }) => Promise<import("koishi").Element>;
71
- export const updateFissues: () => Promise<boolean>;
72
93
  export const getFissures: () => Promise<Fissure[] | "内部错误,获取最新信息失败">;
73
94
  export const getSteelPathFissures: () => Promise<Fissure[] | "内部错误,获取最新信息失败">;
74
95
  export const getRailjackFissures: () => Promise<Fissure[] | "内部错误,获取最新信息失败">;
@@ -76,8 +97,7 @@ export const generateFissureOutput: (puppe: Puppeteer, fissures: Fissure[], type
76
97
  export const wmCommand: (action: Argv, input: string) => Promise<string | import("koishi").Element>;
77
98
  export const wmrCommand: (action: Argv, input: string) => Promise<string | import("koishi").Element>;
78
99
  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>;
100
+ export const arbitrationCommand: (action: Argv, input?: number) => string | Promise<import("koishi").Element>;
81
101
  export const fissureCommand: (action: Argv) => Promise<import("koishi").Element | "内部错误,获取最新信息失败" | "内部错误">;
82
102
  export const steelPathFissureCommand: (action: Argv) => Promise<import("koishi").Element | "内部错误,获取最新信息失败" | "内部错误">;
83
103
  export const railjackFissureCommand: (action: Argv) => Promise<import("koishi").Element | "内部错误,获取最新信息失败" | "内部错误">;