@easecation/ecapi-sdk 0.1.1 → 0.1.3
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 +24 -1
- package/dist/apis.d.ts +0 -187
- package/dist/http.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/method-signatures.d.ts +785 -0
- package/dist/method-signatures.js +2 -0
- package/dist/src/method-signatures.d.ts +896 -0
- package/dist/types.d.ts +91 -4
- package/package.json +3 -2
- package/src/method-signatures.d.ts +896 -0
package/dist/types.d.ts
CHANGED
|
@@ -2,8 +2,95 @@
|
|
|
2
2
|
export type Primitive = string | number | boolean | null | undefined;
|
|
3
3
|
/** A query field can be a scalar or an array (serialized as repeated keys). */
|
|
4
4
|
export type QueryValue = Primitive | Primitive[];
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Common query keys used by ECAPI endpoints.
|
|
7
|
+
* This keeps object-key autocomplete useful while still allowing any custom key.
|
|
8
|
+
*/
|
|
9
|
+
export interface QueryParams {
|
|
10
|
+
action?: QueryValue;
|
|
11
|
+
address?: QueryValue;
|
|
12
|
+
addressee?: QueryValue;
|
|
13
|
+
auth_method?: QueryValue;
|
|
14
|
+
ban_type?: QueryValue;
|
|
15
|
+
bigId?: QueryValue;
|
|
16
|
+
categories?: QueryValue;
|
|
17
|
+
category?: QueryValue;
|
|
18
|
+
client_ip?: QueryValue;
|
|
19
|
+
config_type?: QueryValue;
|
|
20
|
+
csv?: QueryValue;
|
|
21
|
+
current?: QueryValue;
|
|
22
|
+
data?: QueryValue;
|
|
23
|
+
deadline?: QueryValue;
|
|
24
|
+
deadline_type?: QueryValue;
|
|
25
|
+
desc?: QueryValue;
|
|
26
|
+
deviceId?: QueryValue;
|
|
27
|
+
downloadId?: QueryValue;
|
|
28
|
+
duration_range?: QueryValue;
|
|
29
|
+
ecid?: QueryValue;
|
|
30
|
+
enableBanHistoryParse?: QueryValue;
|
|
31
|
+
end?: QueryValue;
|
|
32
|
+
endTime?: QueryValue;
|
|
33
|
+
env?: QueryValue;
|
|
34
|
+
events?: QueryValue;
|
|
35
|
+
filter?: QueryValue;
|
|
36
|
+
frame?: QueryValue;
|
|
37
|
+
from?: QueryValue;
|
|
38
|
+
game?: QueryValue;
|
|
39
|
+
high_risk?: QueryValue;
|
|
40
|
+
id?: QueryValue;
|
|
41
|
+
iditem?: QueryValue;
|
|
42
|
+
idtask?: QueryValue;
|
|
43
|
+
is_ascending?: QueryValue;
|
|
44
|
+
key?: QueryValue;
|
|
45
|
+
lang?: QueryValue;
|
|
46
|
+
limit?: QueryValue;
|
|
47
|
+
map?: QueryValue;
|
|
48
|
+
max?: QueryValue;
|
|
49
|
+
maxPoints?: QueryValue;
|
|
50
|
+
min?: QueryValue;
|
|
51
|
+
name?: QueryValue;
|
|
52
|
+
nick?: QueryValue;
|
|
53
|
+
netease?: QueryValue;
|
|
54
|
+
operation_status?: QueryValue;
|
|
55
|
+
operation_type?: QueryValue;
|
|
56
|
+
operator_id?: QueryValue;
|
|
57
|
+
order?: QueryValue;
|
|
58
|
+
page?: QueryValue;
|
|
59
|
+
pageSize?: QueryValue;
|
|
60
|
+
pattern?: QueryValue;
|
|
61
|
+
permission?: QueryValue;
|
|
62
|
+
permission_type?: QueryValue;
|
|
63
|
+
players?: QueryValue;
|
|
64
|
+
port?: QueryValue;
|
|
65
|
+
record_id?: QueryValue;
|
|
66
|
+
requestid?: QueryValue;
|
|
67
|
+
runtimeid?: QueryValue;
|
|
68
|
+
score_type?: QueryValue;
|
|
69
|
+
search?: QueryValue;
|
|
70
|
+
skipwac?: QueryValue;
|
|
71
|
+
sort?: QueryValue;
|
|
72
|
+
sortBy?: QueryValue;
|
|
73
|
+
sortField?: QueryValue;
|
|
74
|
+
sortOrder?: QueryValue;
|
|
75
|
+
source_nick?: QueryValue;
|
|
76
|
+
start?: QueryValue;
|
|
77
|
+
startTime?: QueryValue;
|
|
78
|
+
state?: QueryValue;
|
|
79
|
+
table?: QueryValue;
|
|
80
|
+
tag?: QueryValue;
|
|
81
|
+
target_nick?: QueryValue;
|
|
82
|
+
target_player_id?: QueryValue;
|
|
83
|
+
to?: QueryValue;
|
|
84
|
+
token?: QueryValue;
|
|
85
|
+
type?: QueryValue;
|
|
86
|
+
types?: QueryValue;
|
|
87
|
+
usetime?: QueryValue;
|
|
88
|
+
uuid?: QueryValue;
|
|
89
|
+
valueType?: QueryValue;
|
|
90
|
+
year?: QueryValue;
|
|
91
|
+
"runtime-id"?: QueryValue;
|
|
92
|
+
[key: string]: QueryValue;
|
|
93
|
+
}
|
|
7
94
|
/** Simple HTTP header map. */
|
|
8
95
|
export type HeaderMap = Record<string, string>;
|
|
9
96
|
/**
|
|
@@ -24,8 +111,8 @@ export type AuthCredentials = {
|
|
|
24
111
|
};
|
|
25
112
|
/** Top-level options used when creating `ECAPIClient`. */
|
|
26
113
|
export interface ClientOptions {
|
|
27
|
-
/** API base URL
|
|
28
|
-
baseUrl
|
|
114
|
+
/** API base URL. Defaults to https://console.easecation.net/apiv2 */
|
|
115
|
+
baseUrl?: string;
|
|
29
116
|
/** Default auth used by all requests unless overridden. */
|
|
30
117
|
auth?: AuthCredentials;
|
|
31
118
|
/** Request timeout in milliseconds. Default is 15000. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easecation/ecapi-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "ECAPI SDK for JavaScript and TypeScript",
|
|
5
5
|
"homepage": "https://github.com/easecation/easecation-api/tree/main/sdk/npm/ecapi-sdk#readme",
|
|
6
6
|
"repository": {
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
"types": "dist/index.d.ts",
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
18
|
+
"src/method-signatures.d.ts",
|
|
18
19
|
"README.md"
|
|
19
20
|
],
|
|
20
21
|
"scripts": {
|
|
21
|
-
"build": "tsc -p tsconfig.json"
|
|
22
|
+
"build": "tsc -p tsconfig.json && mkdir -p dist/src && cp src/method-signatures.d.ts dist/src/method-signatures.d.ts"
|
|
22
23
|
},
|
|
23
24
|
"keywords": [
|
|
24
25
|
"ecapi",
|