@remnawave/backend-contract 2.6.32 → 2.6.34
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/build/backend/api/controllers/node-plugins.d.ts +5 -0
- package/build/backend/api/controllers/node-plugins.d.ts.map +1 -1
- package/build/backend/api/controllers/node-plugins.js +6 -0
- package/build/backend/api/controllers/subscription.d.ts +0 -1
- package/build/backend/api/controllers/subscription.d.ts.map +1 -1
- package/build/backend/api/controllers/subscription.js +0 -1
- package/build/backend/api/routes.d.ts +5 -1
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +5 -1
- package/build/backend/commands/node-plugins/index.d.ts +1 -0
- package/build/backend/commands/node-plugins/index.d.ts.map +1 -1
- package/build/backend/commands/node-plugins/index.js +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.d.ts +60 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.js +22 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts +626 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.js +20 -0
- package/build/backend/commands/node-plugins/torrent-blocker/index.d.ts +3 -0
- package/build/backend/commands/node-plugins/torrent-blocker/index.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/index.js +18 -0
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.d.ts +573 -0
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.js +19 -0
- package/build/backend/commands/subscription/index.d.ts +0 -1
- package/build/backend/commands/subscription/index.d.ts.map +1 -1
- package/build/backend/commands/subscription/index.js +0 -1
- package/build/backend/constants/errors/errors.d.ts +5 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +5 -0
- package/build/backend/models/index.d.ts +1 -0
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -0
- package/build/backend/models/torrent-blocker-report.schema.d.ts +390 -0
- package/build/backend/models/torrent-blocker-report.schema.d.ts.map +1 -0
- package/build/backend/models/torrent-blocker-report.schema.js +55 -0
- package/build/backend/models/webhook/webhook.schema.d.ts +16 -16
- package/build/frontend/api/controllers/node-plugins.js +6 -0
- package/build/frontend/api/controllers/subscription.js +0 -1
- package/build/frontend/api/routes.js +5 -1
- package/build/frontend/commands/node-plugins/index.js +1 -0
- package/build/frontend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.js +22 -0
- package/build/frontend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.js +20 -0
- package/build/frontend/commands/node-plugins/torrent-blocker/index.js +18 -0
- package/build/frontend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.js +19 -0
- package/build/frontend/commands/subscription/index.js +0 -1
- package/build/frontend/constants/errors/errors.js +5 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/torrent-blocker-report.schema.js +55 -0
- package/package.json +1 -1
- package/build/backend/commands/subscription/get-outline-subscription-by-short-uuid.command.d.ts +0 -20
- package/build/backend/commands/subscription/get-outline-subscription-by-short-uuid.command.d.ts.map +0 -1
- package/build/backend/commands/subscription/get-outline-subscription-by-short-uuid.command.js +0 -15
- package/build/frontend/commands/subscription/get-outline-subscription-by-short-uuid.command.js +0 -15
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const TorrentBlockerReportSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
userId: z.ZodNumber;
|
|
5
|
+
nodeId: z.ZodNumber;
|
|
6
|
+
user: z.ZodObject<Pick<{
|
|
7
|
+
uuid: z.ZodString;
|
|
8
|
+
id: z.ZodNumber;
|
|
9
|
+
shortUuid: z.ZodString;
|
|
10
|
+
username: z.ZodString;
|
|
11
|
+
status: z.ZodDefault<z.ZodNativeEnum<{
|
|
12
|
+
readonly ACTIVE: "ACTIVE";
|
|
13
|
+
readonly DISABLED: "DISABLED";
|
|
14
|
+
readonly LIMITED: "LIMITED";
|
|
15
|
+
readonly EXPIRED: "EXPIRED";
|
|
16
|
+
}>>;
|
|
17
|
+
trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
trafficLimitStrategy: z.ZodDefault<z.ZodNativeEnum<{
|
|
19
|
+
readonly NO_RESET: "NO_RESET";
|
|
20
|
+
readonly DAY: "DAY";
|
|
21
|
+
readonly WEEK: "WEEK";
|
|
22
|
+
readonly MONTH: "MONTH";
|
|
23
|
+
}>>;
|
|
24
|
+
expireAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
25
|
+
telegramId: z.ZodNullable<z.ZodNumber>;
|
|
26
|
+
email: z.ZodNullable<z.ZodString>;
|
|
27
|
+
description: z.ZodNullable<z.ZodString>;
|
|
28
|
+
tag: z.ZodNullable<z.ZodString>;
|
|
29
|
+
hwidDeviceLimit: z.ZodNullable<z.ZodNumber>;
|
|
30
|
+
externalSquadUuid: z.ZodNullable<z.ZodString>;
|
|
31
|
+
trojanPassword: z.ZodString;
|
|
32
|
+
vlessUuid: z.ZodString;
|
|
33
|
+
ssPassword: z.ZodString;
|
|
34
|
+
lastTriggeredThreshold: z.ZodDefault<z.ZodNumber>;
|
|
35
|
+
subRevokedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
|
|
36
|
+
subLastUserAgent: z.ZodNullable<z.ZodString>;
|
|
37
|
+
subLastOpenedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
|
|
38
|
+
lastTrafficResetAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
|
|
39
|
+
createdAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
40
|
+
updatedAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
41
|
+
} & {
|
|
42
|
+
subscriptionUrl: z.ZodString;
|
|
43
|
+
activeInternalSquads: z.ZodArray<z.ZodObject<{
|
|
44
|
+
uuid: z.ZodString;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
uuid: string;
|
|
48
|
+
name: string;
|
|
49
|
+
}, {
|
|
50
|
+
uuid: string;
|
|
51
|
+
name: string;
|
|
52
|
+
}>, "many">;
|
|
53
|
+
userTraffic: z.ZodObject<{
|
|
54
|
+
usedTrafficBytes: z.ZodNumber;
|
|
55
|
+
lifetimeUsedTrafficBytes: z.ZodNumber;
|
|
56
|
+
onlineAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
|
|
57
|
+
firstConnectedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
|
|
58
|
+
lastConnectedNodeUuid: z.ZodNullable<z.ZodString>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
usedTrafficBytes: number;
|
|
61
|
+
lifetimeUsedTrafficBytes: number;
|
|
62
|
+
onlineAt: Date | null;
|
|
63
|
+
firstConnectedAt: Date | null;
|
|
64
|
+
lastConnectedNodeUuid: string | null;
|
|
65
|
+
}, {
|
|
66
|
+
usedTrafficBytes: number;
|
|
67
|
+
lifetimeUsedTrafficBytes: number;
|
|
68
|
+
onlineAt: string | null;
|
|
69
|
+
firstConnectedAt: string | null;
|
|
70
|
+
lastConnectedNodeUuid: string | null;
|
|
71
|
+
}>;
|
|
72
|
+
}, "uuid" | "username">, "strip", z.ZodTypeAny, {
|
|
73
|
+
uuid: string;
|
|
74
|
+
username: string;
|
|
75
|
+
}, {
|
|
76
|
+
uuid: string;
|
|
77
|
+
username: string;
|
|
78
|
+
}>;
|
|
79
|
+
node: z.ZodObject<Pick<{
|
|
80
|
+
uuid: z.ZodString;
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
address: z.ZodString;
|
|
83
|
+
port: z.ZodNullable<z.ZodNumber>;
|
|
84
|
+
isConnected: z.ZodBoolean;
|
|
85
|
+
isDisabled: z.ZodBoolean;
|
|
86
|
+
isConnecting: z.ZodBoolean;
|
|
87
|
+
lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
|
|
88
|
+
lastStatusMessage: z.ZodNullable<z.ZodString>;
|
|
89
|
+
xrayVersion: z.ZodNullable<z.ZodString>;
|
|
90
|
+
nodeVersion: z.ZodNullable<z.ZodString>;
|
|
91
|
+
xrayUptime: z.ZodString;
|
|
92
|
+
isTrafficTrackingActive: z.ZodBoolean;
|
|
93
|
+
trafficResetDay: z.ZodNullable<z.ZodNumber>;
|
|
94
|
+
trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
|
|
95
|
+
trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
|
|
96
|
+
notifyPercent: z.ZodNullable<z.ZodNumber>;
|
|
97
|
+
usersOnline: z.ZodNullable<z.ZodNumber>;
|
|
98
|
+
viewPosition: z.ZodNumber;
|
|
99
|
+
countryCode: z.ZodString;
|
|
100
|
+
consumptionMultiplier: z.ZodNumber;
|
|
101
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
102
|
+
cpuCount: z.ZodNullable<z.ZodNumber>;
|
|
103
|
+
cpuModel: z.ZodNullable<z.ZodString>;
|
|
104
|
+
totalRam: z.ZodNullable<z.ZodString>;
|
|
105
|
+
createdAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
106
|
+
updatedAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
107
|
+
configProfile: z.ZodObject<{
|
|
108
|
+
activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
|
|
109
|
+
activeInbounds: z.ZodArray<z.ZodObject<{
|
|
110
|
+
uuid: z.ZodString;
|
|
111
|
+
profileUuid: z.ZodString;
|
|
112
|
+
tag: z.ZodString;
|
|
113
|
+
type: z.ZodString;
|
|
114
|
+
network: z.ZodNullable<z.ZodString>;
|
|
115
|
+
security: z.ZodNullable<z.ZodString>;
|
|
116
|
+
port: z.ZodNullable<z.ZodNumber>;
|
|
117
|
+
rawInbound: z.ZodNullable<z.ZodUnknown>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
type: string;
|
|
120
|
+
uuid: string;
|
|
121
|
+
profileUuid: string;
|
|
122
|
+
tag: string;
|
|
123
|
+
network: string | null;
|
|
124
|
+
security: string | null;
|
|
125
|
+
port: number | null;
|
|
126
|
+
rawInbound?: unknown;
|
|
127
|
+
}, {
|
|
128
|
+
type: string;
|
|
129
|
+
uuid: string;
|
|
130
|
+
profileUuid: string;
|
|
131
|
+
tag: string;
|
|
132
|
+
network: string | null;
|
|
133
|
+
security: string | null;
|
|
134
|
+
port: number | null;
|
|
135
|
+
rawInbound?: unknown;
|
|
136
|
+
}>, "many">;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
activeConfigProfileUuid: string | null;
|
|
139
|
+
activeInbounds: {
|
|
140
|
+
type: string;
|
|
141
|
+
uuid: string;
|
|
142
|
+
profileUuid: string;
|
|
143
|
+
tag: string;
|
|
144
|
+
network: string | null;
|
|
145
|
+
security: string | null;
|
|
146
|
+
port: number | null;
|
|
147
|
+
rawInbound?: unknown;
|
|
148
|
+
}[];
|
|
149
|
+
}, {
|
|
150
|
+
activeConfigProfileUuid: string | null;
|
|
151
|
+
activeInbounds: {
|
|
152
|
+
type: string;
|
|
153
|
+
uuid: string;
|
|
154
|
+
profileUuid: string;
|
|
155
|
+
tag: string;
|
|
156
|
+
network: string | null;
|
|
157
|
+
security: string | null;
|
|
158
|
+
port: number | null;
|
|
159
|
+
rawInbound?: unknown;
|
|
160
|
+
}[];
|
|
161
|
+
}>;
|
|
162
|
+
providerUuid: z.ZodNullable<z.ZodString>;
|
|
163
|
+
provider: z.ZodNullable<z.ZodObject<{
|
|
164
|
+
uuid: z.ZodString;
|
|
165
|
+
name: z.ZodString;
|
|
166
|
+
faviconLink: z.ZodNullable<z.ZodString>;
|
|
167
|
+
loginUrl: z.ZodNullable<z.ZodString>;
|
|
168
|
+
createdAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
169
|
+
updatedAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
170
|
+
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
uuid: string;
|
|
172
|
+
createdAt: Date;
|
|
173
|
+
updatedAt: Date;
|
|
174
|
+
name: string;
|
|
175
|
+
faviconLink: string | null;
|
|
176
|
+
loginUrl: string | null;
|
|
177
|
+
}, {
|
|
178
|
+
uuid: string;
|
|
179
|
+
createdAt: string;
|
|
180
|
+
updatedAt: string;
|
|
181
|
+
name: string;
|
|
182
|
+
faviconLink: string | null;
|
|
183
|
+
loginUrl: string | null;
|
|
184
|
+
}>>;
|
|
185
|
+
activePluginUuid: z.ZodNullable<z.ZodString>;
|
|
186
|
+
}, "uuid" | "countryCode" | "name">, "strip", z.ZodTypeAny, {
|
|
187
|
+
uuid: string;
|
|
188
|
+
countryCode: string;
|
|
189
|
+
name: string;
|
|
190
|
+
}, {
|
|
191
|
+
uuid: string;
|
|
192
|
+
countryCode: string;
|
|
193
|
+
name: string;
|
|
194
|
+
}>;
|
|
195
|
+
report: z.ZodObject<{
|
|
196
|
+
actionReport: z.ZodObject<{
|
|
197
|
+
blocked: z.ZodBoolean;
|
|
198
|
+
ip: z.ZodString;
|
|
199
|
+
blockDuration: z.ZodNumber;
|
|
200
|
+
willUnblockAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
201
|
+
userId: z.ZodString;
|
|
202
|
+
processedAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
ip: string;
|
|
205
|
+
userId: string;
|
|
206
|
+
blocked: boolean;
|
|
207
|
+
blockDuration: number;
|
|
208
|
+
willUnblockAt: Date;
|
|
209
|
+
processedAt: Date;
|
|
210
|
+
}, {
|
|
211
|
+
ip: string;
|
|
212
|
+
userId: string;
|
|
213
|
+
blocked: boolean;
|
|
214
|
+
blockDuration: number;
|
|
215
|
+
willUnblockAt: string;
|
|
216
|
+
processedAt: string;
|
|
217
|
+
}>;
|
|
218
|
+
xrayReport: z.ZodObject<{
|
|
219
|
+
email: z.ZodNullable<z.ZodString>;
|
|
220
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
221
|
+
protocol: z.ZodNullable<z.ZodString>;
|
|
222
|
+
network: z.ZodString;
|
|
223
|
+
source: z.ZodNullable<z.ZodString>;
|
|
224
|
+
destination: z.ZodString;
|
|
225
|
+
routeTarget: z.ZodNullable<z.ZodString>;
|
|
226
|
+
originalTarget: z.ZodNullable<z.ZodString>;
|
|
227
|
+
inboundTag: z.ZodNullable<z.ZodString>;
|
|
228
|
+
inboundName: z.ZodNullable<z.ZodString>;
|
|
229
|
+
inboundLocal: z.ZodNullable<z.ZodString>;
|
|
230
|
+
outboundTag: z.ZodNullable<z.ZodString>;
|
|
231
|
+
ts: z.ZodNumber;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
network: string;
|
|
234
|
+
email: string | null;
|
|
235
|
+
level: number | null;
|
|
236
|
+
protocol: string | null;
|
|
237
|
+
source: string | null;
|
|
238
|
+
destination: string;
|
|
239
|
+
routeTarget: string | null;
|
|
240
|
+
originalTarget: string | null;
|
|
241
|
+
inboundTag: string | null;
|
|
242
|
+
inboundName: string | null;
|
|
243
|
+
inboundLocal: string | null;
|
|
244
|
+
outboundTag: string | null;
|
|
245
|
+
ts: number;
|
|
246
|
+
}, {
|
|
247
|
+
network: string;
|
|
248
|
+
email: string | null;
|
|
249
|
+
level: number | null;
|
|
250
|
+
protocol: string | null;
|
|
251
|
+
source: string | null;
|
|
252
|
+
destination: string;
|
|
253
|
+
routeTarget: string | null;
|
|
254
|
+
originalTarget: string | null;
|
|
255
|
+
inboundTag: string | null;
|
|
256
|
+
inboundName: string | null;
|
|
257
|
+
inboundLocal: string | null;
|
|
258
|
+
outboundTag: string | null;
|
|
259
|
+
ts: number;
|
|
260
|
+
}>;
|
|
261
|
+
}, "strip", z.ZodTypeAny, {
|
|
262
|
+
actionReport: {
|
|
263
|
+
ip: string;
|
|
264
|
+
userId: string;
|
|
265
|
+
blocked: boolean;
|
|
266
|
+
blockDuration: number;
|
|
267
|
+
willUnblockAt: Date;
|
|
268
|
+
processedAt: Date;
|
|
269
|
+
};
|
|
270
|
+
xrayReport: {
|
|
271
|
+
network: string;
|
|
272
|
+
email: string | null;
|
|
273
|
+
level: number | null;
|
|
274
|
+
protocol: string | null;
|
|
275
|
+
source: string | null;
|
|
276
|
+
destination: string;
|
|
277
|
+
routeTarget: string | null;
|
|
278
|
+
originalTarget: string | null;
|
|
279
|
+
inboundTag: string | null;
|
|
280
|
+
inboundName: string | null;
|
|
281
|
+
inboundLocal: string | null;
|
|
282
|
+
outboundTag: string | null;
|
|
283
|
+
ts: number;
|
|
284
|
+
};
|
|
285
|
+
}, {
|
|
286
|
+
actionReport: {
|
|
287
|
+
ip: string;
|
|
288
|
+
userId: string;
|
|
289
|
+
blocked: boolean;
|
|
290
|
+
blockDuration: number;
|
|
291
|
+
willUnblockAt: string;
|
|
292
|
+
processedAt: string;
|
|
293
|
+
};
|
|
294
|
+
xrayReport: {
|
|
295
|
+
network: string;
|
|
296
|
+
email: string | null;
|
|
297
|
+
level: number | null;
|
|
298
|
+
protocol: string | null;
|
|
299
|
+
source: string | null;
|
|
300
|
+
destination: string;
|
|
301
|
+
routeTarget: string | null;
|
|
302
|
+
originalTarget: string | null;
|
|
303
|
+
inboundTag: string | null;
|
|
304
|
+
inboundName: string | null;
|
|
305
|
+
inboundLocal: string | null;
|
|
306
|
+
outboundTag: string | null;
|
|
307
|
+
ts: number;
|
|
308
|
+
};
|
|
309
|
+
}>;
|
|
310
|
+
createdAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
311
|
+
}, "strip", z.ZodTypeAny, {
|
|
312
|
+
user: {
|
|
313
|
+
uuid: string;
|
|
314
|
+
username: string;
|
|
315
|
+
};
|
|
316
|
+
node: {
|
|
317
|
+
uuid: string;
|
|
318
|
+
countryCode: string;
|
|
319
|
+
name: string;
|
|
320
|
+
};
|
|
321
|
+
createdAt: Date;
|
|
322
|
+
id: number;
|
|
323
|
+
userId: number;
|
|
324
|
+
nodeId: number;
|
|
325
|
+
report: {
|
|
326
|
+
actionReport: {
|
|
327
|
+
ip: string;
|
|
328
|
+
userId: string;
|
|
329
|
+
blocked: boolean;
|
|
330
|
+
blockDuration: number;
|
|
331
|
+
willUnblockAt: Date;
|
|
332
|
+
processedAt: Date;
|
|
333
|
+
};
|
|
334
|
+
xrayReport: {
|
|
335
|
+
network: string;
|
|
336
|
+
email: string | null;
|
|
337
|
+
level: number | null;
|
|
338
|
+
protocol: string | null;
|
|
339
|
+
source: string | null;
|
|
340
|
+
destination: string;
|
|
341
|
+
routeTarget: string | null;
|
|
342
|
+
originalTarget: string | null;
|
|
343
|
+
inboundTag: string | null;
|
|
344
|
+
inboundName: string | null;
|
|
345
|
+
inboundLocal: string | null;
|
|
346
|
+
outboundTag: string | null;
|
|
347
|
+
ts: number;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
}, {
|
|
351
|
+
user: {
|
|
352
|
+
uuid: string;
|
|
353
|
+
username: string;
|
|
354
|
+
};
|
|
355
|
+
node: {
|
|
356
|
+
uuid: string;
|
|
357
|
+
countryCode: string;
|
|
358
|
+
name: string;
|
|
359
|
+
};
|
|
360
|
+
createdAt: string;
|
|
361
|
+
id: number;
|
|
362
|
+
userId: number;
|
|
363
|
+
nodeId: number;
|
|
364
|
+
report: {
|
|
365
|
+
actionReport: {
|
|
366
|
+
ip: string;
|
|
367
|
+
userId: string;
|
|
368
|
+
blocked: boolean;
|
|
369
|
+
blockDuration: number;
|
|
370
|
+
willUnblockAt: string;
|
|
371
|
+
processedAt: string;
|
|
372
|
+
};
|
|
373
|
+
xrayReport: {
|
|
374
|
+
network: string;
|
|
375
|
+
email: string | null;
|
|
376
|
+
level: number | null;
|
|
377
|
+
protocol: string | null;
|
|
378
|
+
source: string | null;
|
|
379
|
+
destination: string;
|
|
380
|
+
routeTarget: string | null;
|
|
381
|
+
originalTarget: string | null;
|
|
382
|
+
inboundTag: string | null;
|
|
383
|
+
inboundName: string | null;
|
|
384
|
+
inboundLocal: string | null;
|
|
385
|
+
outboundTag: string | null;
|
|
386
|
+
ts: number;
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
}>;
|
|
390
|
+
//# sourceMappingURL=torrent-blocker-report.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"torrent-blocker-report.schema.d.ts","sourceRoot":"","sources":["../../../models/torrent-blocker-report.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDrC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TorrentBlockerReportSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const extended_users_schema_1 = require("./extended-users.schema");
|
|
6
|
+
const nodes_schema_1 = require("./nodes.schema");
|
|
7
|
+
exports.TorrentBlockerReportSchema = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.number(),
|
|
9
|
+
userId: zod_1.z.number(),
|
|
10
|
+
nodeId: zod_1.z.number(),
|
|
11
|
+
user: extended_users_schema_1.ExtendedUsersSchema.pick({
|
|
12
|
+
uuid: true,
|
|
13
|
+
username: true,
|
|
14
|
+
}),
|
|
15
|
+
node: nodes_schema_1.NodesSchema.pick({
|
|
16
|
+
uuid: true,
|
|
17
|
+
name: true,
|
|
18
|
+
countryCode: true,
|
|
19
|
+
}),
|
|
20
|
+
report: zod_1.z.object({
|
|
21
|
+
actionReport: zod_1.z.object({
|
|
22
|
+
blocked: zod_1.z.boolean(),
|
|
23
|
+
ip: zod_1.z.string(),
|
|
24
|
+
blockDuration: zod_1.z.number(),
|
|
25
|
+
willUnblockAt: zod_1.z
|
|
26
|
+
.string()
|
|
27
|
+
.datetime({ offset: true, local: true })
|
|
28
|
+
.transform((str) => new Date(str)),
|
|
29
|
+
userId: zod_1.z.string(),
|
|
30
|
+
processedAt: zod_1.z
|
|
31
|
+
.string()
|
|
32
|
+
.datetime({ offset: true, local: true })
|
|
33
|
+
.transform((str) => new Date(str)),
|
|
34
|
+
}),
|
|
35
|
+
xrayReport: zod_1.z.object({
|
|
36
|
+
email: zod_1.z.string().nullable(),
|
|
37
|
+
level: zod_1.z.number().nullable(),
|
|
38
|
+
protocol: zod_1.z.string().nullable(),
|
|
39
|
+
network: zod_1.z.string(),
|
|
40
|
+
source: zod_1.z.string().nullable(),
|
|
41
|
+
destination: zod_1.z.string(),
|
|
42
|
+
routeTarget: zod_1.z.string().nullable(),
|
|
43
|
+
originalTarget: zod_1.z.string().nullable(),
|
|
44
|
+
inboundTag: zod_1.z.string().nullable(),
|
|
45
|
+
inboundName: zod_1.z.string().nullable(),
|
|
46
|
+
inboundLocal: zod_1.z.string().nullable(),
|
|
47
|
+
outboundTag: zod_1.z.string().nullable(),
|
|
48
|
+
ts: zod_1.z.number(),
|
|
49
|
+
}),
|
|
50
|
+
}),
|
|
51
|
+
createdAt: zod_1.z
|
|
52
|
+
.string()
|
|
53
|
+
.datetime()
|
|
54
|
+
.transform((str) => new Date(str)),
|
|
55
|
+
});
|
|
@@ -1483,17 +1483,17 @@ export declare const RemnawaveWebhookTorrentBlockerEvents: z.ZodObject<{
|
|
|
1483
1483
|
processedAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
1484
1484
|
}, "strip", z.ZodTypeAny, {
|
|
1485
1485
|
ip: string;
|
|
1486
|
+
userId: string;
|
|
1486
1487
|
blocked: boolean;
|
|
1487
1488
|
blockDuration: number;
|
|
1488
1489
|
willUnblockAt: Date;
|
|
1489
|
-
userId: string;
|
|
1490
1490
|
processedAt: Date;
|
|
1491
1491
|
}, {
|
|
1492
1492
|
ip: string;
|
|
1493
|
+
userId: string;
|
|
1493
1494
|
blocked: boolean;
|
|
1494
1495
|
blockDuration: number;
|
|
1495
1496
|
willUnblockAt: string;
|
|
1496
|
-
userId: string;
|
|
1497
1497
|
processedAt: string;
|
|
1498
1498
|
}>;
|
|
1499
1499
|
xrayReport: z.ZodObject<{
|
|
@@ -1542,10 +1542,10 @@ export declare const RemnawaveWebhookTorrentBlockerEvents: z.ZodObject<{
|
|
|
1542
1542
|
}, "strip", z.ZodTypeAny, {
|
|
1543
1543
|
actionReport: {
|
|
1544
1544
|
ip: string;
|
|
1545
|
+
userId: string;
|
|
1545
1546
|
blocked: boolean;
|
|
1546
1547
|
blockDuration: number;
|
|
1547
1548
|
willUnblockAt: Date;
|
|
1548
|
-
userId: string;
|
|
1549
1549
|
processedAt: Date;
|
|
1550
1550
|
};
|
|
1551
1551
|
xrayReport: {
|
|
@@ -1566,10 +1566,10 @@ export declare const RemnawaveWebhookTorrentBlockerEvents: z.ZodObject<{
|
|
|
1566
1566
|
}, {
|
|
1567
1567
|
actionReport: {
|
|
1568
1568
|
ip: string;
|
|
1569
|
+
userId: string;
|
|
1569
1570
|
blocked: boolean;
|
|
1570
1571
|
blockDuration: number;
|
|
1571
1572
|
willUnblockAt: string;
|
|
1572
|
-
userId: string;
|
|
1573
1573
|
processedAt: string;
|
|
1574
1574
|
};
|
|
1575
1575
|
xrayReport: {
|
|
@@ -1682,10 +1682,10 @@ export declare const RemnawaveWebhookTorrentBlockerEvents: z.ZodObject<{
|
|
|
1682
1682
|
report: {
|
|
1683
1683
|
actionReport: {
|
|
1684
1684
|
ip: string;
|
|
1685
|
+
userId: string;
|
|
1685
1686
|
blocked: boolean;
|
|
1686
1687
|
blockDuration: number;
|
|
1687
1688
|
willUnblockAt: Date;
|
|
1688
|
-
userId: string;
|
|
1689
1689
|
processedAt: Date;
|
|
1690
1690
|
};
|
|
1691
1691
|
xrayReport: {
|
|
@@ -1798,10 +1798,10 @@ export declare const RemnawaveWebhookTorrentBlockerEvents: z.ZodObject<{
|
|
|
1798
1798
|
report: {
|
|
1799
1799
|
actionReport: {
|
|
1800
1800
|
ip: string;
|
|
1801
|
+
userId: string;
|
|
1801
1802
|
blocked: boolean;
|
|
1802
1803
|
blockDuration: number;
|
|
1803
1804
|
willUnblockAt: string;
|
|
1804
|
-
userId: string;
|
|
1805
1805
|
processedAt: string;
|
|
1806
1806
|
};
|
|
1807
1807
|
xrayReport: {
|
|
@@ -1916,10 +1916,10 @@ export declare const RemnawaveWebhookTorrentBlockerEvents: z.ZodObject<{
|
|
|
1916
1916
|
report: {
|
|
1917
1917
|
actionReport: {
|
|
1918
1918
|
ip: string;
|
|
1919
|
+
userId: string;
|
|
1919
1920
|
blocked: boolean;
|
|
1920
1921
|
blockDuration: number;
|
|
1921
1922
|
willUnblockAt: Date;
|
|
1922
|
-
userId: string;
|
|
1923
1923
|
processedAt: Date;
|
|
1924
1924
|
};
|
|
1925
1925
|
xrayReport: {
|
|
@@ -2037,10 +2037,10 @@ export declare const RemnawaveWebhookTorrentBlockerEvents: z.ZodObject<{
|
|
|
2037
2037
|
report: {
|
|
2038
2038
|
actionReport: {
|
|
2039
2039
|
ip: string;
|
|
2040
|
+
userId: string;
|
|
2040
2041
|
blocked: boolean;
|
|
2041
2042
|
blockDuration: number;
|
|
2042
2043
|
willUnblockAt: string;
|
|
2043
|
-
userId: string;
|
|
2044
2044
|
processedAt: string;
|
|
2045
2045
|
};
|
|
2046
2046
|
xrayReport: {
|
|
@@ -3542,17 +3542,17 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
|
|
|
3542
3542
|
processedAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
3543
3543
|
}, "strip", z.ZodTypeAny, {
|
|
3544
3544
|
ip: string;
|
|
3545
|
+
userId: string;
|
|
3545
3546
|
blocked: boolean;
|
|
3546
3547
|
blockDuration: number;
|
|
3547
3548
|
willUnblockAt: Date;
|
|
3548
|
-
userId: string;
|
|
3549
3549
|
processedAt: Date;
|
|
3550
3550
|
}, {
|
|
3551
3551
|
ip: string;
|
|
3552
|
+
userId: string;
|
|
3552
3553
|
blocked: boolean;
|
|
3553
3554
|
blockDuration: number;
|
|
3554
3555
|
willUnblockAt: string;
|
|
3555
|
-
userId: string;
|
|
3556
3556
|
processedAt: string;
|
|
3557
3557
|
}>;
|
|
3558
3558
|
xrayReport: z.ZodObject<{
|
|
@@ -3601,10 +3601,10 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
|
|
|
3601
3601
|
}, "strip", z.ZodTypeAny, {
|
|
3602
3602
|
actionReport: {
|
|
3603
3603
|
ip: string;
|
|
3604
|
+
userId: string;
|
|
3604
3605
|
blocked: boolean;
|
|
3605
3606
|
blockDuration: number;
|
|
3606
3607
|
willUnblockAt: Date;
|
|
3607
|
-
userId: string;
|
|
3608
3608
|
processedAt: Date;
|
|
3609
3609
|
};
|
|
3610
3610
|
xrayReport: {
|
|
@@ -3625,10 +3625,10 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
|
|
|
3625
3625
|
}, {
|
|
3626
3626
|
actionReport: {
|
|
3627
3627
|
ip: string;
|
|
3628
|
+
userId: string;
|
|
3628
3629
|
blocked: boolean;
|
|
3629
3630
|
blockDuration: number;
|
|
3630
3631
|
willUnblockAt: string;
|
|
3631
|
-
userId: string;
|
|
3632
3632
|
processedAt: string;
|
|
3633
3633
|
};
|
|
3634
3634
|
xrayReport: {
|
|
@@ -3741,10 +3741,10 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
|
|
|
3741
3741
|
report: {
|
|
3742
3742
|
actionReport: {
|
|
3743
3743
|
ip: string;
|
|
3744
|
+
userId: string;
|
|
3744
3745
|
blocked: boolean;
|
|
3745
3746
|
blockDuration: number;
|
|
3746
3747
|
willUnblockAt: Date;
|
|
3747
|
-
userId: string;
|
|
3748
3748
|
processedAt: Date;
|
|
3749
3749
|
};
|
|
3750
3750
|
xrayReport: {
|
|
@@ -3857,10 +3857,10 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
|
|
|
3857
3857
|
report: {
|
|
3858
3858
|
actionReport: {
|
|
3859
3859
|
ip: string;
|
|
3860
|
+
userId: string;
|
|
3860
3861
|
blocked: boolean;
|
|
3861
3862
|
blockDuration: number;
|
|
3862
3863
|
willUnblockAt: string;
|
|
3863
|
-
userId: string;
|
|
3864
3864
|
processedAt: string;
|
|
3865
3865
|
};
|
|
3866
3866
|
xrayReport: {
|
|
@@ -3975,10 +3975,10 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
|
|
|
3975
3975
|
report: {
|
|
3976
3976
|
actionReport: {
|
|
3977
3977
|
ip: string;
|
|
3978
|
+
userId: string;
|
|
3978
3979
|
blocked: boolean;
|
|
3979
3980
|
blockDuration: number;
|
|
3980
3981
|
willUnblockAt: Date;
|
|
3981
|
-
userId: string;
|
|
3982
3982
|
processedAt: Date;
|
|
3983
3983
|
};
|
|
3984
3984
|
xrayReport: {
|
|
@@ -4096,10 +4096,10 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
|
|
|
4096
4096
|
report: {
|
|
4097
4097
|
actionReport: {
|
|
4098
4098
|
ip: string;
|
|
4099
|
+
userId: string;
|
|
4099
4100
|
blocked: boolean;
|
|
4100
4101
|
blockDuration: number;
|
|
4101
4102
|
willUnblockAt: string;
|
|
4102
|
-
userId: string;
|
|
4103
4103
|
processedAt: string;
|
|
4104
4104
|
};
|
|
4105
4105
|
xrayReport: {
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NODE_PLUGINS_ROUTES = exports.NODE_PLUGINS_CONTROLLER = void 0;
|
|
4
4
|
exports.NODE_PLUGINS_CONTROLLER = 'node-plugins';
|
|
5
5
|
const ACTIONS_ROUTE = 'actions';
|
|
6
|
+
const TORRENT_BLOCKER_ROUTE = 'torrent-blocker';
|
|
6
7
|
exports.NODE_PLUGINS_ROUTES = {
|
|
7
8
|
GET_ALL: '', // get
|
|
8
9
|
GET: (uuid) => `${uuid}`, // get
|
|
@@ -14,4 +15,9 @@ exports.NODE_PLUGINS_ROUTES = {
|
|
|
14
15
|
CLONE: `${ACTIONS_ROUTE}/clone`,
|
|
15
16
|
},
|
|
16
17
|
EXECUTOR: 'executor',
|
|
18
|
+
TORRENT_BLOCKER: {
|
|
19
|
+
GET_REPORTS: `${TORRENT_BLOCKER_ROUTE}`,
|
|
20
|
+
GET_REPORTS_STATS: `${TORRENT_BLOCKER_ROUTE}/stats`,
|
|
21
|
+
TRUNCATE_REPORTS: `${TORRENT_BLOCKER_ROUTE}/truncate`,
|
|
22
|
+
},
|
|
17
23
|
};
|
|
@@ -135,7 +135,6 @@ exports.REST_API = {
|
|
|
135
135
|
},
|
|
136
136
|
SUBSCRIPTION: {
|
|
137
137
|
GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}${shortUuid}`,
|
|
138
|
-
GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}`,
|
|
139
138
|
GET_INFO: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_INFO(shortUuid)}`,
|
|
140
139
|
},
|
|
141
140
|
HOSTS: {
|
|
@@ -303,6 +302,11 @@ exports.REST_API = {
|
|
|
303
302
|
CLONE: `${exports.ROOT}/${CONTROLLERS.NODE_PLUGINS_CONTROLLER}/${CONTROLLERS.NODE_PLUGINS_ROUTES.ACTIONS.CLONE}`,
|
|
304
303
|
},
|
|
305
304
|
EXECUTOR: `${exports.ROOT}/${CONTROLLERS.NODE_PLUGINS_CONTROLLER}/${CONTROLLERS.NODE_PLUGINS_ROUTES.EXECUTOR}`,
|
|
305
|
+
TORRENT_BLOCKER: {
|
|
306
|
+
GET_REPORTS: `${exports.ROOT}/${CONTROLLERS.NODE_PLUGINS_CONTROLLER}/${CONTROLLERS.NODE_PLUGINS_ROUTES.TORRENT_BLOCKER.GET_REPORTS}`,
|
|
307
|
+
GET_REPORTS_STATS: `${exports.ROOT}/${CONTROLLERS.NODE_PLUGINS_CONTROLLER}/${CONTROLLERS.NODE_PLUGINS_ROUTES.TORRENT_BLOCKER.GET_REPORTS_STATS}`,
|
|
308
|
+
TRUNCATE_REPORTS: `${exports.ROOT}/${CONTROLLERS.NODE_PLUGINS_CONTROLLER}/${CONTROLLERS.NODE_PLUGINS_ROUTES.TORRENT_BLOCKER.TRUNCATE_REPORTS}`,
|
|
309
|
+
},
|
|
306
310
|
},
|
|
307
311
|
BANDWIDTH_STATS: {
|
|
308
312
|
NODES: {
|
|
@@ -20,4 +20,5 @@ __exportStar(require("./delete-node-plugin.command"), exports);
|
|
|
20
20
|
__exportStar(require("./executor.command"), exports);
|
|
21
21
|
__exportStar(require("./get-node-plugin.command"), exports);
|
|
22
22
|
__exportStar(require("./get-node-plugins.command"), exports);
|
|
23
|
+
__exportStar(require("./torrent-blocker"), exports);
|
|
23
24
|
__exportStar(require("./update-node-plugin.command"), exports);
|