-
Notifications
You must be signed in to change notification settings - Fork 0
/
ServerObjects.d.ts
138 lines (137 loc) · 3.27 KB
/
ServerObjects.d.ts
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
declare namespace zetaret.node {
export interface SplitURL {
url?: string;
query?: string;
path?: string;
pages?: Array<string>;
root?: string;
page?: string;
sub?: string;
param?: string;
vars?: object;
post?: object;
}
export interface RouteObject extends SplitURL {
rawpath?: string;
pageIndex?: number;
pageCurrent?: string;
pageProxy?: string;
exact?: boolean;
output?: object;
}
export interface AugmentRequest {
__reqid?: number;
__encoding?: string;
__bodyBuffer?: Buffer;
}
export interface AugmentResponse {
__splitUrl?: SplitURL;
__body?: string | Buffer;
__encoding?: string;
__async?: boolean;
__await?: Promise<any>;
__data?: Array<any>;
__rcode?: number;
__dataJoin?: string;
__dataPrefix?: string;
__dataSuffix?: string;
__disablePipeline?: boolean;
}
export interface RoutedResponse extends AugmentResponse {
__splitUrl?: RouteObject;
__breakRoute?: boolean;
__headers?: object;
__rawdata?: Array<object>;
}
export interface ProtoResponse extends AugmentResponse {
__json(data: any, code?: number): void
}
export interface XProtoResponse extends ProtoResponse {
__asyncEnd(code?: number): void
__asyncDataEnd(data: any, code?: number): void
__asyncJsonEnd(data: any, code?: number): void
}
export interface RequestHeaders {
REQUEST_URL?: string;
REQUEST_DOMAIN?: string;
REQUEST_METHOD?: string;
REQUEST_PORT?: number | string;
}
export interface ResponseHeaders {
MAX_RESPONSE_LENGTH?: number;
MAX_BUFFER_LENGTH?: number;
}
export interface ServerEnvironment {
dumpall?: boolean;
dumpkeys?: Array<string>;
omit?: object;
maxBodyLength?: number;
contenttype?: string;
sidinterval?: number;
statsin?: ServerStats;
statsout?: ServerStats;
keepBodyBuffer?: boolean;
swapBodyBuffer?: boolean;
}
export interface SingleServerStats {
xserver?: boolean;
xserverModule?: string;
htport?: number;
https?: boolean;
httpsop?: ServerOptions;
h2op?: object;
}
export interface ServerStats extends SingleServerStats {
reqnum?: number;
cookieid?: string;
}
export interface ClusterStats extends ServerStats {
requested?: number;
enforceRequested?: boolean;
coreThreads?: number;
masterPort?: boolean;
port?: number;
servers?: SingleServerStats[];
}
export interface ServerOptions {
keyPath?: string;
key?: string;
certPath?: string;
cert?: string;
pfxPath?: string;
pfx?: string;
caPath?: string;
ca?: Array<string> | string;
h2?: boolean;
}
export interface BasicServerGlobal {
DisableAutoStartOfProtoSSChe?: boolean;
EnableGlobalStatsFile?: boolean;
GlobalStatsFile?: ServerStats;
ProtoSSCheStatsFile?: string;
ProtoSSCheXServerPath?: string;
SubserverRequireModule?: string;
LobbyServerRequireModule?: string;
CardServerRequireModule?: string;
VoyageRequireModule?: string;
DeepVoyageRequireModule?: string;
}
export interface ServerModule {
xpros: ServerModule;
SERVERID: string;
EVENTS?: object;
resetExtends(): void
getExtends(): ProtoSSCheCTOR
getExtendedServerProtoSS(ProtoSSChe: ProtoSSCheCTOR): ProtoSSCheCTOR
}
export interface ModuleInstance {
serverche: ProtoSSChe;
xpro: ServerModule;
xprocls: ProtoSSCheCTOR;
xmodule: string;
}
export interface NodeServerData {
httpsop: object;
htserv: XServer;
}
}