forked from mmdzov/luIP-marzban
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.js
66 lines (55 loc) · 1.18 KB
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Globally
/**
* @typedef {Object} IPSDataType
* @property {string} ip
* @property {number} port
* @property {string} date
* @property {boolean} first
*/
/**
* @typedef {IPSDataType[]} IPSType
*/
/**
* @typedef {Object} DataInterfaceType
* @property {string} email
* @property {number} allowedUsers
* @property {IPSType} ips
*/
/**
* @typedef {object} WebSocketConfigType
* @property {string} url
* @property {string} accessToken
* @property {object} DB
* @property {string} node
* @property {Object} api
*/
/**
* @typedef {Object} NewUserIpType
* @property {string} ip
* @property {string} port
* @property {string} email
*/
/**
* @typedef {Object} BanIpConfigAddType
* @property {string} ip
*/
// API
/**
* @typedef {Object} ApiSetTokenType
* @property {string} username
* @property {string} password
*/
/**
* @typedef {"INVALID" | "NOT_MATCH" | "AUTH" | "DUPLICATE" | "NOT_FOUND"} ApiErrorTypes
*/
/**
* @typedef {Object} ApiResponseErrorType
* @property {ApiErrorTypes} type
* @property {string} reason
*/
/**
* @typedef {Object} ApiResponseType
* @property {Object | null} data
* @property {ApiResponseErrorType} error
* @property {0|1} status
*/