@long2ice/relayx-backend 0.0.1

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.
Files changed (88) hide show
  1. package/README.md +13 -0
  2. package/dist/app.d.ts +8592 -0
  3. package/dist/bullmq/index.d.ts +1 -0
  4. package/dist/bullmq/jobs.d.ts +34 -0
  5. package/dist/bullmq/queue.d.ts +6 -0
  6. package/dist/bullmq/queuedash.d.ts +12 -0
  7. package/dist/bullmq/worker.d.ts +1 -0
  8. package/dist/config.d.ts +16 -0
  9. package/dist/db.d.ts +3 -0
  10. package/dist/generated/prisma/zod/index.d.ts +2289 -0
  11. package/dist/index.d.ts +1 -0
  12. package/dist/middlewares/auth.d.ts +3 -0
  13. package/dist/middlewares/ip.d.ts +2 -0
  14. package/dist/middlewares/license.d.ts +2 -0
  15. package/dist/middlewares/plan.d.ts +2 -0
  16. package/dist/routes/admin/license.d.ts +90 -0
  17. package/dist/routes/admin/node.d.ts +919 -0
  18. package/dist/routes/admin/node_group.d.ts +2115 -0
  19. package/dist/routes/admin/pay.d.ts +261 -0
  20. package/dist/routes/admin/plan.d.ts +198 -0
  21. package/dist/routes/admin/plan_coupon.d.ts +92 -0
  22. package/dist/routes/admin/stats.d.ts +77 -0
  23. package/dist/routes/admin/system_config.d.ts +68 -0
  24. package/dist/routes/admin/ticket.d.ts +113 -0
  25. package/dist/routes/admin/topup.d.ts +88 -0
  26. package/dist/routes/admin/topup_activity.d.ts +84 -0
  27. package/dist/routes/admin/tunnel.d.ts +566 -0
  28. package/dist/routes/admin/user.d.ts +299 -0
  29. package/dist/routes/admin/user_plan.d.ts +109 -0
  30. package/dist/routes/bot.d.ts +13 -0
  31. package/dist/routes/dns_provider.d.ts +240 -0
  32. package/dist/routes/health.d.ts +3 -0
  33. package/dist/routes/in_node_group_dns.d.ts +132 -0
  34. package/dist/routes/license.d.ts +50 -0
  35. package/dist/routes/node.d.ts +148 -0
  36. package/dist/routes/node_group.d.ts +1498 -0
  37. package/dist/routes/pay.d.ts +34 -0
  38. package/dist/routes/plan.d.ts +148 -0
  39. package/dist/routes/plan_coupon.d.ts +22 -0
  40. package/dist/routes/system_config.d.ts +87 -0
  41. package/dist/routes/ticket.d.ts +129 -0
  42. package/dist/routes/topup.d.ts +93 -0
  43. package/dist/routes/tunnel.d.ts +742 -0
  44. package/dist/routes/user.d.ts +293 -0
  45. package/dist/schemas/context.d.ts +9 -0
  46. package/dist/schemas/license.d.ts +7 -0
  47. package/dist/schemas/request.d.ts +1181 -0
  48. package/dist/schemas/response.d.ts +2439 -0
  49. package/dist/schemas/socket.io.d.ts +33 -0
  50. package/dist/schemas/tunnel.d.ts +10 -0
  51. package/dist/services/dns/cloudflare.d.ts +12 -0
  52. package/dist/services/dns/huawei.d.ts +12 -0
  53. package/dist/services/dns/index.d.ts +4 -0
  54. package/dist/services/dns/interface.d.ts +8 -0
  55. package/dist/services/dns_provider.d.ts +46 -0
  56. package/dist/services/email.d.ts +11 -0
  57. package/dist/services/fernet.d.ts +2 -0
  58. package/dist/services/in_node_group_dns.d.ts +65 -0
  59. package/dist/services/license.d.ts +87 -0
  60. package/dist/services/logger.d.ts +7 -0
  61. package/dist/services/node.d.ts +39 -0
  62. package/dist/services/node_group.d.ts +75 -0
  63. package/dist/services/notify.d.ts +44 -0
  64. package/dist/services/order.d.ts +3 -0
  65. package/dist/services/pay.d.ts +6 -0
  66. package/dist/services/plan.d.ts +119 -0
  67. package/dist/services/plan_coupon.d.ts +16 -0
  68. package/dist/services/redis.d.ts +59 -0
  69. package/dist/services/stackauth.d.ts +25 -0
  70. package/dist/services/sysinfo.d.ts +7 -0
  71. package/dist/services/system_config.d.ts +7 -0
  72. package/dist/services/telegram.d.ts +8 -0
  73. package/dist/services/ticket.d.ts +134 -0
  74. package/dist/services/topup.d.ts +37 -0
  75. package/dist/services/topup_activity.d.ts +21 -0
  76. package/dist/services/tunnel.d.ts +1235 -0
  77. package/dist/services/user.d.ts +25 -0
  78. package/dist/socket-io/events.d.ts +13 -0
  79. package/dist/socket-io/handlers/disconnect.d.ts +2 -0
  80. package/dist/socket-io/handlers/listen.d.ts +3 -0
  81. package/dist/socket-io/handlers/register.d.ts +2 -0
  82. package/dist/socket-io/handlers/sysinfo.d.ts +2 -0
  83. package/dist/socket-io/index.d.ts +3 -0
  84. package/dist/socket-io/utils.d.ts +8 -0
  85. package/dist/utils/date.d.ts +1 -0
  86. package/dist/utils/ip.d.ts +2 -0
  87. package/dist/utils/uuid.d.ts +1 -0
  88. package/package.json +82 -0
@@ -0,0 +1,1181 @@
1
+ import { z } from "zod";
2
+ import { NotifyType } from "../services/notify";
3
+ export declare const IdSchema: z.ZodObject<{
4
+ id: z.ZodNumber;
5
+ }, "strip", z.ZodTypeAny, {
6
+ id: number;
7
+ }, {
8
+ id: number;
9
+ }>;
10
+ export declare const TableRequestSchema: z.ZodObject<{
11
+ page: z.ZodDefault<z.ZodNumber>;
12
+ perPage: z.ZodDefault<z.ZodNumber>;
13
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
14
+ id: string;
15
+ desc: boolean;
16
+ }[], string>>>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ page: number;
19
+ perPage: number;
20
+ sort?: {
21
+ id: string;
22
+ desc: boolean;
23
+ }[] | null | undefined;
24
+ }, {
25
+ sort?: string | null | undefined;
26
+ page?: number | undefined;
27
+ perPage?: number | undefined;
28
+ }>;
29
+ export declare const TunnelChainSchema: z.ZodObject<{
30
+ node_group_id: z.ZodNumber;
31
+ node_type: z.ZodNativeEnum<{
32
+ in: "in";
33
+ out: "out";
34
+ }>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ node_type: "in" | "out";
37
+ node_group_id: number;
38
+ }, {
39
+ node_type: "in" | "out";
40
+ node_group_id: number;
41
+ }>;
42
+ export declare const ForwardAddressSchema: z.ZodObject<{
43
+ address: z.ZodString;
44
+ weight: z.ZodNumber;
45
+ host: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ weight: number;
48
+ address: string;
49
+ host?: string | null | undefined;
50
+ }, {
51
+ weight: number;
52
+ address: string;
53
+ host?: string | null | undefined;
54
+ }>;
55
+ export declare const TunnelRequestSchema: z.ZodObject<Omit<{
56
+ tunnel_type: z.ZodEnum<["tcp", "mtcp", "udp", "relayx", "mtls", "mwss", "wss", "tls", "quic"]>;
57
+ category: z.ZodEnum<["port_forward", "remote_port_forward"]>;
58
+ status: z.ZodEnum<["active", "inactive"]>;
59
+ load_balance_type: z.ZodEnum<["round", "rand", "fifo", "hash", "ll", "lc"]>;
60
+ ip_type: z.ZodEnum<["auto", "ipv4", "ipv6"]>;
61
+ id: z.ZodNumber;
62
+ name: z.ZodString;
63
+ listen_ip: z.ZodNullable<z.ZodString>;
64
+ listen_port: z.ZodNullable<z.ZodNumber>;
65
+ listen_protocol: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
66
+ is_port_used: z.ZodBoolean;
67
+ white_list: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
68
+ forward_addresses: z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>;
69
+ forward_addresses_protocol: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
70
+ order_by: z.ZodNumber;
71
+ ip_limit: z.ZodNullable<z.ZodNumber>;
72
+ bandwidth_limit: z.ZodNullable<z.ZodNumber>;
73
+ traffic: z.ZodNumber;
74
+ traffic_cost: z.ZodNumber;
75
+ stats: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
76
+ proxy_protocol: z.ZodBoolean;
77
+ created_at: z.ZodDate;
78
+ updated_at: z.ZodDate;
79
+ in_node_group_id: z.ZodNumber;
80
+ out_node_group_id: z.ZodNullable<z.ZodNumber>;
81
+ user_id: z.ZodNumber;
82
+ }, "id" | "order_by" | "created_at" | "updated_at" | "user_id" | "listen_protocol" | "is_port_used" | "white_list" | "forward_addresses" | "forward_addresses_protocol" | "traffic" | "traffic_cost" | "stats"> & {
83
+ forward_addresses: z.ZodArray<z.ZodObject<{
84
+ address: z.ZodString;
85
+ weight: z.ZodNumber;
86
+ host: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ weight: number;
89
+ address: string;
90
+ host?: string | null | undefined;
91
+ }, {
92
+ weight: number;
93
+ address: string;
94
+ host?: string | null | undefined;
95
+ }>, "many">;
96
+ tunnel_chains: z.ZodOptional<z.ZodArray<z.ZodObject<{
97
+ node_group_id: z.ZodNumber;
98
+ node_type: z.ZodNativeEnum<{
99
+ in: "in";
100
+ out: "out";
101
+ }>;
102
+ }, "strip", z.ZodTypeAny, {
103
+ node_type: "in" | "out";
104
+ node_group_id: number;
105
+ }, {
106
+ node_type: "in" | "out";
107
+ node_group_id: number;
108
+ }>, "many">>;
109
+ listen_protocol: z.ZodEffects<z.ZodNullable<z.ZodObject<{
110
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ type?: string | null | undefined;
115
+ username?: string | null | undefined;
116
+ password?: string | null | undefined;
117
+ }, {
118
+ type?: string | null | undefined;
119
+ username?: string | null | undefined;
120
+ password?: string | null | undefined;
121
+ }>>, {
122
+ type?: string | null | undefined;
123
+ username?: string | null | undefined;
124
+ password?: string | null | undefined;
125
+ } | null, {
126
+ type?: string | null | undefined;
127
+ username?: string | null | undefined;
128
+ password?: string | null | undefined;
129
+ } | null>;
130
+ forward_addresses_protocol: z.ZodEffects<z.ZodNullable<z.ZodObject<{
131
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ type?: string | null | undefined;
136
+ username?: string | null | undefined;
137
+ password?: string | null | undefined;
138
+ }, {
139
+ type?: string | null | undefined;
140
+ username?: string | null | undefined;
141
+ password?: string | null | undefined;
142
+ }>>, {
143
+ type?: string | null | undefined;
144
+ username?: string | null | undefined;
145
+ password?: string | null | undefined;
146
+ } | null, {
147
+ type?: string | null | undefined;
148
+ username?: string | null | undefined;
149
+ password?: string | null | undefined;
150
+ } | null>;
151
+ white_list: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ name: string;
154
+ load_balance_type: "round" | "rand" | "fifo" | "hash" | "ll" | "lc";
155
+ status: "active" | "inactive";
156
+ tunnel_type: "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic";
157
+ category: "port_forward" | "remote_port_forward";
158
+ listen_ip: string | null;
159
+ listen_port: number | null;
160
+ listen_protocol: {
161
+ type?: string | null | undefined;
162
+ username?: string | null | undefined;
163
+ password?: string | null | undefined;
164
+ } | null;
165
+ white_list: string[] | null;
166
+ forward_addresses: {
167
+ weight: number;
168
+ address: string;
169
+ host?: string | null | undefined;
170
+ }[];
171
+ forward_addresses_protocol: {
172
+ type?: string | null | undefined;
173
+ username?: string | null | undefined;
174
+ password?: string | null | undefined;
175
+ } | null;
176
+ ip_type: "auto" | "ipv4" | "ipv6";
177
+ ip_limit: number | null;
178
+ bandwidth_limit: number | null;
179
+ proxy_protocol: boolean;
180
+ in_node_group_id: number;
181
+ out_node_group_id: number | null;
182
+ tunnel_chains?: {
183
+ node_type: "in" | "out";
184
+ node_group_id: number;
185
+ }[] | undefined;
186
+ }, {
187
+ name: string;
188
+ load_balance_type: "round" | "rand" | "fifo" | "hash" | "ll" | "lc";
189
+ status: "active" | "inactive";
190
+ tunnel_type: "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic";
191
+ category: "port_forward" | "remote_port_forward";
192
+ listen_ip: string | null;
193
+ listen_port: number | null;
194
+ listen_protocol: {
195
+ type?: string | null | undefined;
196
+ username?: string | null | undefined;
197
+ password?: string | null | undefined;
198
+ } | null;
199
+ white_list: string[] | null;
200
+ forward_addresses: {
201
+ weight: number;
202
+ address: string;
203
+ host?: string | null | undefined;
204
+ }[];
205
+ forward_addresses_protocol: {
206
+ type?: string | null | undefined;
207
+ username?: string | null | undefined;
208
+ password?: string | null | undefined;
209
+ } | null;
210
+ ip_type: "auto" | "ipv4" | "ipv6";
211
+ ip_limit: number | null;
212
+ bandwidth_limit: number | null;
213
+ proxy_protocol: boolean;
214
+ in_node_group_id: number;
215
+ out_node_group_id: number | null;
216
+ tunnel_chains?: {
217
+ node_type: "in" | "out";
218
+ node_group_id: number;
219
+ }[] | undefined;
220
+ }>;
221
+ export declare const TunnelImportRequestSchema: z.ZodObject<{
222
+ in_node_group_id: z.ZodNumber;
223
+ out_node_group_id: z.ZodNullable<z.ZodNumber>;
224
+ tunnel_type: z.ZodNativeEnum<{
225
+ tcp: "tcp";
226
+ mtcp: "mtcp";
227
+ udp: "udp";
228
+ relayx: "relayx";
229
+ mtls: "mtls";
230
+ mwss: "mwss";
231
+ wss: "wss";
232
+ tls: "tls";
233
+ quic: "quic";
234
+ }>;
235
+ tunnels: z.ZodArray<z.ZodObject<{
236
+ dest: z.ZodArray<z.ZodString, "many">;
237
+ listen_port: z.ZodNullable<z.ZodNumber>;
238
+ name: z.ZodString;
239
+ }, "strip", z.ZodTypeAny, {
240
+ name: string;
241
+ listen_port: number | null;
242
+ dest: string[];
243
+ }, {
244
+ name: string;
245
+ listen_port: number | null;
246
+ dest: string[];
247
+ }>, "many">;
248
+ random_port_is_exist: z.ZodBoolean;
249
+ overwrite_tunnel_on_port_conflict: z.ZodBoolean;
250
+ }, "strip", z.ZodTypeAny, {
251
+ tunnel_type: "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic";
252
+ in_node_group_id: number;
253
+ out_node_group_id: number | null;
254
+ tunnels: {
255
+ name: string;
256
+ listen_port: number | null;
257
+ dest: string[];
258
+ }[];
259
+ random_port_is_exist: boolean;
260
+ overwrite_tunnel_on_port_conflict: boolean;
261
+ }, {
262
+ tunnel_type: "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic";
263
+ in_node_group_id: number;
264
+ out_node_group_id: number | null;
265
+ tunnels: {
266
+ name: string;
267
+ listen_port: number | null;
268
+ dest: string[];
269
+ }[];
270
+ random_port_is_exist: boolean;
271
+ overwrite_tunnel_on_port_conflict: boolean;
272
+ }>;
273
+ export declare const BatchIdSchema: z.ZodObject<{
274
+ ids: z.ZodEffects<z.ZodString, number[], string>;
275
+ }, "strip", z.ZodTypeAny, {
276
+ ids: number[];
277
+ }, {
278
+ ids: string;
279
+ }>;
280
+ export declare const BatchTunnelRequestSchema: z.ZodObject<{
281
+ ids: z.ZodArray<z.ZodNumber, "many">;
282
+ status: z.ZodOptional<z.ZodNativeEnum<{
283
+ active: "active";
284
+ inactive: "inactive";
285
+ }>>;
286
+ in_node_group_id: z.ZodOptional<z.ZodNumber>;
287
+ out_node_group_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
288
+ ip_type: z.ZodOptional<z.ZodNativeEnum<{
289
+ auto: "auto";
290
+ ipv4: "ipv4";
291
+ ipv6: "ipv6";
292
+ }>>;
293
+ tunnel_type: z.ZodOptional<z.ZodNativeEnum<{
294
+ tcp: "tcp";
295
+ mtcp: "mtcp";
296
+ udp: "udp";
297
+ relayx: "relayx";
298
+ mtls: "mtls";
299
+ mwss: "mwss";
300
+ wss: "wss";
301
+ tls: "tls";
302
+ quic: "quic";
303
+ }>>;
304
+ load_balance_type: z.ZodOptional<z.ZodNativeEnum<{
305
+ round: "round";
306
+ rand: "rand";
307
+ fifo: "fifo";
308
+ hash: "hash";
309
+ ll: "ll";
310
+ lc: "lc";
311
+ }>>;
312
+ ip_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
313
+ bandwidth_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
314
+ in_tunnel_chains: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
315
+ out_tunnel_chains: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
316
+ }, "strip", z.ZodTypeAny, {
317
+ ids: number[];
318
+ load_balance_type?: "round" | "rand" | "fifo" | "hash" | "ll" | "lc" | undefined;
319
+ status?: "active" | "inactive" | undefined;
320
+ tunnel_type?: "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic" | undefined;
321
+ ip_type?: "auto" | "ipv4" | "ipv6" | undefined;
322
+ ip_limit?: number | null | undefined;
323
+ bandwidth_limit?: number | null | undefined;
324
+ in_node_group_id?: number | undefined;
325
+ out_node_group_id?: number | null | undefined;
326
+ in_tunnel_chains?: number[] | null | undefined;
327
+ out_tunnel_chains?: number[] | null | undefined;
328
+ }, {
329
+ ids: number[];
330
+ load_balance_type?: "round" | "rand" | "fifo" | "hash" | "ll" | "lc" | undefined;
331
+ status?: "active" | "inactive" | undefined;
332
+ tunnel_type?: "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic" | undefined;
333
+ ip_type?: "auto" | "ipv4" | "ipv6" | undefined;
334
+ ip_limit?: number | null | undefined;
335
+ bandwidth_limit?: number | null | undefined;
336
+ in_node_group_id?: number | undefined;
337
+ out_node_group_id?: number | null | undefined;
338
+ in_tunnel_chains?: number[] | null | undefined;
339
+ out_tunnel_chains?: number[] | null | undefined;
340
+ }>;
341
+ export declare const PaymentRequestSchema: z.ZodObject<Pick<{
342
+ method: z.ZodEnum<["epay", "bepusdt", "heleket"]>;
343
+ status: z.ZodEnum<["active", "inactive"]>;
344
+ id: z.ZodNumber;
345
+ fixed_fee: z.ZodNullable<z.ZodNumber>;
346
+ percent_fee: z.ZodNullable<z.ZodNumber>;
347
+ name: z.ZodString;
348
+ url: z.ZodString;
349
+ config: z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>;
350
+ type: z.ZodNullable<z.ZodString>;
351
+ order_by: z.ZodNumber;
352
+ created_at: z.ZodDate;
353
+ updated_at: z.ZodDate;
354
+ }, "name" | "status" | "type" | "fixed_fee" | "percent_fee" | "url" | "method"> & {
355
+ config: z.ZodRecord<z.ZodString, z.ZodString>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ name: string;
358
+ status: "active" | "inactive";
359
+ type: string | null;
360
+ fixed_fee: number | null;
361
+ percent_fee: number | null;
362
+ url: string;
363
+ config: Record<string, string>;
364
+ method: "epay" | "bepusdt" | "heleket";
365
+ }, {
366
+ name: string;
367
+ status: "active" | "inactive";
368
+ type: string | null;
369
+ fixed_fee: number | null;
370
+ percent_fee: number | null;
371
+ url: string;
372
+ config: Record<string, string>;
373
+ method: "epay" | "bepusdt" | "heleket";
374
+ }>;
375
+ export declare const NodeGroupRequestSchema: z.ZodObject<Pick<{
376
+ node_type: z.ZodEnum<["in", "out"]>;
377
+ load_balance_type: z.ZodEnum<["round", "rand", "fifo", "hash", "ll", "lc"]>;
378
+ bypass_type: z.ZodEnum<["whitelist", "blacklist"]>;
379
+ id: z.ZodNumber;
380
+ token: z.ZodString;
381
+ name: z.ZodString;
382
+ port_range: z.ZodNullable<z.ZodString>;
383
+ connect_ip: z.ZodNullable<z.ZodString>;
384
+ allow_listen_protocol: z.ZodBoolean;
385
+ allow_tunnel_types: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
386
+ bypass_list: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
387
+ admission: z.ZodBoolean;
388
+ block_protocols: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
389
+ traffic_rate: z.ZodNumber;
390
+ need_out_node_group: z.ZodBoolean;
391
+ allow_out_node_groups: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
392
+ allow_in_node_groups: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
393
+ order_by: z.ZodNumber;
394
+ created_at: z.ZodDate;
395
+ updated_at: z.ZodDate;
396
+ user_id: z.ZodNumber;
397
+ }, "name" | "port_range" | "connect_ip" | "node_type" | "load_balance_type" | "allow_listen_protocol" | "admission" | "need_out_node_group"> & {
398
+ traffic_rate: z.ZodNumber;
399
+ allow_tunnel_types: z.ZodNullable<z.ZodArray<z.ZodNativeEnum<{
400
+ tcp: "tcp";
401
+ mtcp: "mtcp";
402
+ udp: "udp";
403
+ relayx: "relayx";
404
+ mtls: "mtls";
405
+ mwss: "mwss";
406
+ wss: "wss";
407
+ tls: "tls";
408
+ quic: "quic";
409
+ }>, "many">>;
410
+ allow_out_node_groups: z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>;
411
+ allow_in_node_groups: z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>;
412
+ block_protocols: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
413
+ bypass_type: z.ZodDefault<z.ZodNativeEnum<{
414
+ whitelist: "whitelist";
415
+ blacklist: "blacklist";
416
+ }>>;
417
+ bypass_list: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
418
+ }, "strip", z.ZodTypeAny, {
419
+ name: string;
420
+ port_range: string | null;
421
+ connect_ip: string | null;
422
+ node_type: "in" | "out";
423
+ load_balance_type: "round" | "rand" | "fifo" | "hash" | "ll" | "lc";
424
+ allow_listen_protocol: boolean;
425
+ allow_tunnel_types: ("tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic")[] | null;
426
+ bypass_type: "whitelist" | "blacklist";
427
+ bypass_list: string[] | null;
428
+ admission: boolean;
429
+ block_protocols: string[] | null;
430
+ traffic_rate: number;
431
+ need_out_node_group: boolean;
432
+ allow_out_node_groups: number[] | null;
433
+ allow_in_node_groups: number[] | null;
434
+ }, {
435
+ name: string;
436
+ port_range: string | null;
437
+ connect_ip: string | null;
438
+ node_type: "in" | "out";
439
+ load_balance_type: "round" | "rand" | "fifo" | "hash" | "ll" | "lc";
440
+ allow_listen_protocol: boolean;
441
+ allow_tunnel_types: ("tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic")[] | null;
442
+ bypass_list: string[] | null;
443
+ admission: boolean;
444
+ block_protocols: string[] | null;
445
+ traffic_rate: number;
446
+ need_out_node_group: boolean;
447
+ allow_out_node_groups: number[] | null;
448
+ allow_in_node_groups: number[] | null;
449
+ bypass_type?: "whitelist" | "blacklist" | undefined;
450
+ }>;
451
+ export declare const NodeGroupQuerySchema: z.ZodObject<{
452
+ page: z.ZodDefault<z.ZodNumber>;
453
+ perPage: z.ZodDefault<z.ZodNumber>;
454
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
455
+ id: string;
456
+ desc: boolean;
457
+ }[], string>>>;
458
+ } & {
459
+ name: z.ZodOptional<z.ZodString>;
460
+ connect_ip: z.ZodOptional<z.ZodString>;
461
+ node_type: z.ZodOptional<z.ZodNativeEnum<{
462
+ in: "in";
463
+ out: "out";
464
+ }>>;
465
+ email: z.ZodOptional<z.ZodString>;
466
+ }, "strip", z.ZodTypeAny, {
467
+ page: number;
468
+ perPage: number;
469
+ name?: string | undefined;
470
+ connect_ip?: string | undefined;
471
+ node_type?: "in" | "out" | undefined;
472
+ email?: string | undefined;
473
+ sort?: {
474
+ id: string;
475
+ desc: boolean;
476
+ }[] | null | undefined;
477
+ }, {
478
+ name?: string | undefined;
479
+ connect_ip?: string | undefined;
480
+ node_type?: "in" | "out" | undefined;
481
+ email?: string | undefined;
482
+ sort?: string | null | undefined;
483
+ page?: number | undefined;
484
+ perPage?: number | undefined;
485
+ }>;
486
+ export declare const SystemConfigUpdateSchema: z.ZodRecord<z.ZodNativeEnum<{
487
+ MIN_TOPUP_AMOUNT: "MIN_TOPUP_AMOUNT";
488
+ NOTICE: "NOTICE";
489
+ NOTICE_POPUP: "NOTICE_POPUP";
490
+ NOTICE_POPUP_INTERVAL_HOURS: "NOTICE_POPUP_INTERVAL_HOURS";
491
+ SITE_NAME: "SITE_NAME";
492
+ SITE_DESCRIPTION: "SITE_DESCRIPTION";
493
+ ALLOW_REGISTER: "ALLOW_REGISTER";
494
+ LOGO_URL: "LOGO_URL";
495
+ HIDE_NODE_STATUS: "HIDE_NODE_STATUS";
496
+ AUTO_UPDATE_AGENT: "AUTO_UPDATE_AGENT";
497
+ CHATWOOT_BASE_URL: "CHATWOOT_BASE_URL";
498
+ CHATWOOT_TOKEN: "CHATWOOT_TOKEN";
499
+ TUNNEL_TRAFFIC_RETENTION_DAYS: "TUNNEL_TRAFFIC_RETENTION_DAYS";
500
+ HIDE_FOOTER: "HIDE_FOOTER";
501
+ HIDE_DOCS: "HIDE_DOCS";
502
+ LANDING_PAGE_URL: "LANDING_PAGE_URL";
503
+ REFERRAL_COMMISSION_RATE: "REFERRAL_COMMISSION_RATE";
504
+ REFERRAL_FIRST_ONLY: "REFERRAL_FIRST_ONLY";
505
+ REFERRAL_MODE: "REFERRAL_MODE";
506
+ OBSERVER_PERIOD: "OBSERVER_PERIOD";
507
+ EMAIL_PROVIDER: "EMAIL_PROVIDER";
508
+ SMTP_HOST: "SMTP_HOST";
509
+ SMTP_PORT: "SMTP_PORT";
510
+ SMTP_SECURE: "SMTP_SECURE";
511
+ SMTP_USER: "SMTP_USER";
512
+ SMTP_PASS: "SMTP_PASS";
513
+ SMTP_FROM: "SMTP_FROM";
514
+ RESEND_API_KEY: "RESEND_API_KEY";
515
+ RESEND_FROM: "RESEND_FROM";
516
+ }>, z.ZodAny>;
517
+ export declare const TopupOrderQuerySchema: z.ZodObject<{
518
+ page: z.ZodDefault<z.ZodNumber>;
519
+ perPage: z.ZodDefault<z.ZodNumber>;
520
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
521
+ id: string;
522
+ desc: boolean;
523
+ }[], string>>>;
524
+ } & {
525
+ status: z.ZodOptional<z.ZodNativeEnum<{
526
+ pending: "pending";
527
+ success: "success";
528
+ cancelled: "cancelled";
529
+ }>>;
530
+ payment: z.ZodOptional<z.ZodNumber>;
531
+ order_id: z.ZodOptional<z.ZodString>;
532
+ email: z.ZodOptional<z.ZodString>;
533
+ }, "strip", z.ZodTypeAny, {
534
+ page: number;
535
+ perPage: number;
536
+ email?: string | undefined;
537
+ status?: "pending" | "success" | "cancelled" | undefined;
538
+ order_id?: string | undefined;
539
+ payment?: number | undefined;
540
+ sort?: {
541
+ id: string;
542
+ desc: boolean;
543
+ }[] | null | undefined;
544
+ }, {
545
+ email?: string | undefined;
546
+ status?: "pending" | "success" | "cancelled" | undefined;
547
+ order_id?: string | undefined;
548
+ payment?: number | undefined;
549
+ sort?: string | null | undefined;
550
+ page?: number | undefined;
551
+ perPage?: number | undefined;
552
+ }>;
553
+ export declare const TopupActivityQuerySchema: z.ZodObject<{
554
+ page: z.ZodDefault<z.ZodNumber>;
555
+ perPage: z.ZodDefault<z.ZodNumber>;
556
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
557
+ id: string;
558
+ desc: boolean;
559
+ }[], string>>>;
560
+ } & {
561
+ type: z.ZodOptional<z.ZodNativeEnum<{
562
+ percentage: "percentage";
563
+ fixed: "fixed";
564
+ }>>;
565
+ }, "strip", z.ZodTypeAny, {
566
+ page: number;
567
+ perPage: number;
568
+ type?: "fixed" | "percentage" | undefined;
569
+ sort?: {
570
+ id: string;
571
+ desc: boolean;
572
+ }[] | null | undefined;
573
+ }, {
574
+ type?: "fixed" | "percentage" | undefined;
575
+ sort?: string | null | undefined;
576
+ page?: number | undefined;
577
+ perPage?: number | undefined;
578
+ }>;
579
+ export declare const BalanceLogQuerySchema: z.ZodObject<{
580
+ page: z.ZodDefault<z.ZodNumber>;
581
+ perPage: z.ZodDefault<z.ZodNumber>;
582
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
583
+ id: string;
584
+ desc: boolean;
585
+ }[], string>>>;
586
+ } & {
587
+ type: z.ZodOptional<z.ZodNativeEnum<{
588
+ topup: "topup";
589
+ plan: "plan";
590
+ referral: "referral";
591
+ }>>;
592
+ email: z.ZodOptional<z.ZodString>;
593
+ }, "strip", z.ZodTypeAny, {
594
+ page: number;
595
+ perPage: number;
596
+ email?: string | undefined;
597
+ type?: "topup" | "plan" | "referral" | undefined;
598
+ sort?: {
599
+ id: string;
600
+ desc: boolean;
601
+ }[] | null | undefined;
602
+ }, {
603
+ email?: string | undefined;
604
+ type?: "topup" | "plan" | "referral" | undefined;
605
+ sort?: string | null | undefined;
606
+ page?: number | undefined;
607
+ perPage?: number | undefined;
608
+ }>;
609
+ export declare const NodeQuerySchema: z.ZodObject<{
610
+ page: z.ZodDefault<z.ZodNumber>;
611
+ perPage: z.ZodDefault<z.ZodNumber>;
612
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
613
+ id: string;
614
+ desc: boolean;
615
+ }[], string>>>;
616
+ } & {
617
+ node_group_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodEffects<z.ZodNumber, number[], number>]>>>;
618
+ ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
619
+ node_id: z.ZodOptional<z.ZodString>;
620
+ status: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
621
+ active: "active";
622
+ inactive: "inactive";
623
+ }>>>;
624
+ node_type: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
625
+ in: "in";
626
+ out: "out";
627
+ }>>>;
628
+ version: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, boolean, string>>>;
629
+ backup: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, boolean, string>>>;
630
+ }, "strip", z.ZodTypeAny, {
631
+ page: number;
632
+ perPage: number;
633
+ node_type?: "in" | "out" | null | undefined;
634
+ status?: "active" | "inactive" | null | undefined;
635
+ node_id?: string | undefined;
636
+ version?: boolean | null | undefined;
637
+ backup?: boolean | null | undefined;
638
+ node_group_id?: number[] | null | undefined;
639
+ sort?: {
640
+ id: string;
641
+ desc: boolean;
642
+ }[] | null | undefined;
643
+ ip?: string | null | undefined;
644
+ }, {
645
+ node_type?: "in" | "out" | null | undefined;
646
+ status?: "active" | "inactive" | null | undefined;
647
+ node_id?: string | undefined;
648
+ version?: string | null | undefined;
649
+ backup?: string | null | undefined;
650
+ node_group_id?: number | number[] | null | undefined;
651
+ sort?: string | null | undefined;
652
+ ip?: string | null | undefined;
653
+ page?: number | undefined;
654
+ perPage?: number | undefined;
655
+ }>;
656
+ export declare const UserUpdateSchema: z.ZodObject<{
657
+ notify_subscriptions: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotifyType>, "many">>;
658
+ auto_renew: z.ZodOptional<z.ZodBoolean>;
659
+ api_key: z.ZodOptional<z.ZodBoolean>;
660
+ }, "strip", z.ZodTypeAny, {
661
+ auto_renew?: boolean | undefined;
662
+ api_key?: boolean | undefined;
663
+ notify_subscriptions?: NotifyType[] | undefined;
664
+ }, {
665
+ auto_renew?: boolean | undefined;
666
+ api_key?: boolean | undefined;
667
+ notify_subscriptions?: NotifyType[] | undefined;
668
+ }>;
669
+ export declare const UserRequestSchema: z.ZodObject<Pick<{
670
+ status: z.ZodEnum<["active", "inactive"]>;
671
+ id: z.ZodNumber;
672
+ super_admin: z.ZodBoolean;
673
+ email: z.ZodString;
674
+ balance: z.ZodNumber;
675
+ tg_id: z.ZodNullable<z.ZodString>;
676
+ uid: z.ZodNullable<z.ZodString>;
677
+ note: z.ZodNullable<z.ZodString>;
678
+ parent_id: z.ZodNullable<z.ZodNumber>;
679
+ referral_commission_rate: z.ZodNullable<z.ZodNumber>;
680
+ referral_first_only: z.ZodNullable<z.ZodBoolean>;
681
+ auto_renew: z.ZodBoolean;
682
+ api_key: z.ZodString;
683
+ notify_subscriptions: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
684
+ created_at: z.ZodDate;
685
+ updated_at: z.ZodDate;
686
+ }, "super_admin" | "email" | "balance" | "tg_id" | "note" | "referral_commission_rate" | "referral_first_only" | "auto_renew" | "status"> & {
687
+ password: z.ZodOptional<z.ZodString>;
688
+ }, "strip", z.ZodTypeAny, {
689
+ super_admin: boolean;
690
+ email: string;
691
+ balance: number;
692
+ tg_id: string | null;
693
+ note: string | null;
694
+ referral_commission_rate: number | null;
695
+ referral_first_only: boolean | null;
696
+ auto_renew: boolean;
697
+ status: "active" | "inactive";
698
+ password?: string | undefined;
699
+ }, {
700
+ super_admin: boolean;
701
+ email: string;
702
+ balance: number;
703
+ tg_id: string | null;
704
+ note: string | null;
705
+ referral_commission_rate: number | null;
706
+ referral_first_only: boolean | null;
707
+ auto_renew: boolean;
708
+ status: "active" | "inactive";
709
+ password?: string | undefined;
710
+ }>;
711
+ export declare const TunnelQuerySchema: z.ZodObject<{
712
+ page: z.ZodDefault<z.ZodNumber>;
713
+ perPage: z.ZodDefault<z.ZodNumber>;
714
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
715
+ id: string;
716
+ desc: boolean;
717
+ }[], string>>>;
718
+ } & {
719
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
720
+ in_node_group_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodEffects<z.ZodNumber, number[], number>]>>>;
721
+ out_node_group_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodEffects<z.ZodNumber, number[], number>]>>>;
722
+ in_tunnel_chain_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodEffects<z.ZodNumber, number[], number>]>>>;
723
+ out_tunnel_chain_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodEffects<z.ZodNumber, number[], number>]>>>;
724
+ status: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodNativeEnum<{
725
+ active: "active";
726
+ inactive: "inactive";
727
+ }>, "many">, z.ZodEffects<z.ZodNativeEnum<{
728
+ active: "active";
729
+ inactive: "inactive";
730
+ }>, ("active" | "inactive")[], "active" | "inactive">]>>>;
731
+ ip_type: z.ZodOptional<z.ZodNativeEnum<{
732
+ auto: "auto";
733
+ ipv4: "ipv4";
734
+ ipv6: "ipv6";
735
+ }>>;
736
+ tunnel_type: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodNativeEnum<{
737
+ tcp: "tcp";
738
+ mtcp: "mtcp";
739
+ udp: "udp";
740
+ relayx: "relayx";
741
+ mtls: "mtls";
742
+ mwss: "mwss";
743
+ wss: "wss";
744
+ tls: "tls";
745
+ quic: "quic";
746
+ }>, "many">, z.ZodEffects<z.ZodNativeEnum<{
747
+ tcp: "tcp";
748
+ mtcp: "mtcp";
749
+ udp: "udp";
750
+ relayx: "relayx";
751
+ mtls: "mtls";
752
+ mwss: "mwss";
753
+ wss: "wss";
754
+ tls: "tls";
755
+ quic: "quic";
756
+ }>, ("tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic")[], "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic">]>>>;
757
+ listen_port: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
758
+ }, "strip", z.ZodTypeAny, {
759
+ page: number;
760
+ perPage: number;
761
+ name?: string | null | undefined;
762
+ status?: ("active" | "inactive")[] | null | undefined;
763
+ tunnel_type?: ("tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic")[] | null | undefined;
764
+ listen_port?: number | null | undefined;
765
+ ip_type?: "auto" | "ipv4" | "ipv6" | undefined;
766
+ in_node_group_id?: number[] | null | undefined;
767
+ out_node_group_id?: number[] | null | undefined;
768
+ sort?: {
769
+ id: string;
770
+ desc: boolean;
771
+ }[] | null | undefined;
772
+ in_tunnel_chain_id?: number[] | null | undefined;
773
+ out_tunnel_chain_id?: number[] | null | undefined;
774
+ }, {
775
+ name?: string | null | undefined;
776
+ status?: "active" | "inactive" | ("active" | "inactive")[] | null | undefined;
777
+ tunnel_type?: "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic" | ("tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic")[] | null | undefined;
778
+ listen_port?: number | null | undefined;
779
+ ip_type?: "auto" | "ipv4" | "ipv6" | undefined;
780
+ in_node_group_id?: number | number[] | null | undefined;
781
+ out_node_group_id?: number | number[] | null | undefined;
782
+ sort?: string | null | undefined;
783
+ page?: number | undefined;
784
+ perPage?: number | undefined;
785
+ in_tunnel_chain_id?: number | number[] | null | undefined;
786
+ out_tunnel_chain_id?: number | number[] | null | undefined;
787
+ }>;
788
+ export declare const TunnelTrafficQuerySchema: z.ZodObject<{
789
+ page: z.ZodDefault<z.ZodNumber>;
790
+ perPage: z.ZodDefault<z.ZodNumber>;
791
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
792
+ id: string;
793
+ desc: boolean;
794
+ }[], string>>>;
795
+ } & {
796
+ tunnel_name: z.ZodOptional<z.ZodString>;
797
+ in_node_group_id: z.ZodOptional<z.ZodNumber>;
798
+ out_node_group_id: z.ZodOptional<z.ZodNumber>;
799
+ start_date: z.ZodOptional<z.ZodDate>;
800
+ end_date: z.ZodOptional<z.ZodDate>;
801
+ }, "strip", z.ZodTypeAny, {
802
+ page: number;
803
+ perPage: number;
804
+ in_node_group_id?: number | undefined;
805
+ out_node_group_id?: number | undefined;
806
+ sort?: {
807
+ id: string;
808
+ desc: boolean;
809
+ }[] | null | undefined;
810
+ tunnel_name?: string | undefined;
811
+ start_date?: Date | undefined;
812
+ end_date?: Date | undefined;
813
+ }, {
814
+ in_node_group_id?: number | undefined;
815
+ out_node_group_id?: number | undefined;
816
+ sort?: string | null | undefined;
817
+ page?: number | undefined;
818
+ perPage?: number | undefined;
819
+ tunnel_name?: string | undefined;
820
+ start_date?: Date | undefined;
821
+ end_date?: Date | undefined;
822
+ }>;
823
+ export declare const TunnelTrafficStatsQuerySchema: z.ZodObject<{
824
+ start_date: z.ZodOptional<z.ZodDate>;
825
+ end_date: z.ZodOptional<z.ZodDate>;
826
+ in_node_group_id: z.ZodOptional<z.ZodNumber>;
827
+ out_node_group_id: z.ZodOptional<z.ZodNumber>;
828
+ aggregate_by: z.ZodDefault<z.ZodEnum<["day", "month", "year"]>>;
829
+ }, "strip", z.ZodTypeAny, {
830
+ aggregate_by: "month" | "year" | "day";
831
+ in_node_group_id?: number | undefined;
832
+ out_node_group_id?: number | undefined;
833
+ start_date?: Date | undefined;
834
+ end_date?: Date | undefined;
835
+ }, {
836
+ in_node_group_id?: number | undefined;
837
+ out_node_group_id?: number | undefined;
838
+ start_date?: Date | undefined;
839
+ end_date?: Date | undefined;
840
+ aggregate_by?: "month" | "year" | "day" | undefined;
841
+ }>;
842
+ export declare const TunnelStatsQuerySchema: z.ZodObject<{
843
+ page: z.ZodDefault<z.ZodNumber>;
844
+ perPage: z.ZodDefault<z.ZodNumber>;
845
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
846
+ id: string;
847
+ desc: boolean;
848
+ }[], string>>>;
849
+ } & {
850
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
851
+ in_node_group_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodEffects<z.ZodNumber, number[], number>]>>>;
852
+ out_node_group_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodEffects<z.ZodNumber, number[], number>]>>>;
853
+ }, "strip", z.ZodTypeAny, {
854
+ page: number;
855
+ perPage: number;
856
+ name?: string | null | undefined;
857
+ in_node_group_id?: number[] | null | undefined;
858
+ out_node_group_id?: number[] | null | undefined;
859
+ sort?: {
860
+ id: string;
861
+ desc: boolean;
862
+ }[] | null | undefined;
863
+ }, {
864
+ name?: string | null | undefined;
865
+ in_node_group_id?: number | number[] | null | undefined;
866
+ out_node_group_id?: number | number[] | null | undefined;
867
+ sort?: string | null | undefined;
868
+ page?: number | undefined;
869
+ perPage?: number | undefined;
870
+ }>;
871
+ export declare const AdminStatsQuerySchema: z.ZodObject<{
872
+ start_date: z.ZodOptional<z.ZodDate>;
873
+ end_date: z.ZodOptional<z.ZodDate>;
874
+ aggregate_by: z.ZodDefault<z.ZodEnum<["day", "month", "year"]>>;
875
+ }, "strip", z.ZodTypeAny, {
876
+ aggregate_by: "month" | "year" | "day";
877
+ start_date?: Date | undefined;
878
+ end_date?: Date | undefined;
879
+ }, {
880
+ start_date?: Date | undefined;
881
+ end_date?: Date | undefined;
882
+ aggregate_by?: "month" | "year" | "day" | undefined;
883
+ }>;
884
+ export declare const ReferralStatsQuerySchema: z.ZodObject<{
885
+ start_date: z.ZodOptional<z.ZodDate>;
886
+ end_date: z.ZodOptional<z.ZodDate>;
887
+ aggregate_by: z.ZodDefault<z.ZodEnum<["day", "month", "year"]>>;
888
+ }, "strip", z.ZodTypeAny, {
889
+ aggregate_by: "month" | "year" | "day";
890
+ start_date?: Date | undefined;
891
+ end_date?: Date | undefined;
892
+ }, {
893
+ start_date?: Date | undefined;
894
+ end_date?: Date | undefined;
895
+ aggregate_by?: "month" | "year" | "day" | undefined;
896
+ }>;
897
+ export declare const AdminTunnelRequestSchema: z.ZodObject<Omit<{
898
+ tunnel_type: z.ZodEnum<["tcp", "mtcp", "udp", "relayx", "mtls", "mwss", "wss", "tls", "quic"]>;
899
+ category: z.ZodEnum<["port_forward", "remote_port_forward"]>;
900
+ status: z.ZodEnum<["active", "inactive"]>;
901
+ load_balance_type: z.ZodEnum<["round", "rand", "fifo", "hash", "ll", "lc"]>;
902
+ ip_type: z.ZodEnum<["auto", "ipv4", "ipv6"]>;
903
+ id: z.ZodNumber;
904
+ name: z.ZodString;
905
+ listen_ip: z.ZodNullable<z.ZodString>;
906
+ listen_port: z.ZodNullable<z.ZodNumber>;
907
+ listen_protocol: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
908
+ is_port_used: z.ZodBoolean;
909
+ white_list: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
910
+ forward_addresses: z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>;
911
+ forward_addresses_protocol: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
912
+ order_by: z.ZodNumber;
913
+ ip_limit: z.ZodNullable<z.ZodNumber>;
914
+ bandwidth_limit: z.ZodNullable<z.ZodNumber>;
915
+ traffic: z.ZodNumber;
916
+ traffic_cost: z.ZodNumber;
917
+ stats: z.ZodNullable<z.ZodType<import("../generated/prisma/client/runtime/library").JsonValue, z.ZodTypeDef, import("../generated/prisma/client/runtime/library").JsonValue>>;
918
+ proxy_protocol: z.ZodBoolean;
919
+ created_at: z.ZodDate;
920
+ updated_at: z.ZodDate;
921
+ in_node_group_id: z.ZodNumber;
922
+ out_node_group_id: z.ZodNullable<z.ZodNumber>;
923
+ user_id: z.ZodNumber;
924
+ }, "id" | "order_by" | "created_at" | "updated_at" | "user_id" | "listen_protocol" | "is_port_used" | "white_list" | "forward_addresses" | "forward_addresses_protocol" | "traffic" | "traffic_cost" | "stats"> & {
925
+ forward_addresses: z.ZodArray<z.ZodObject<{
926
+ address: z.ZodString;
927
+ weight: z.ZodNumber;
928
+ host: z.ZodOptional<z.ZodNullable<z.ZodString>>;
929
+ }, "strip", z.ZodTypeAny, {
930
+ weight: number;
931
+ address: string;
932
+ host?: string | null | undefined;
933
+ }, {
934
+ weight: number;
935
+ address: string;
936
+ host?: string | null | undefined;
937
+ }>, "many">;
938
+ tunnel_chains: z.ZodOptional<z.ZodArray<z.ZodObject<{
939
+ node_group_id: z.ZodNumber;
940
+ node_type: z.ZodNativeEnum<{
941
+ in: "in";
942
+ out: "out";
943
+ }>;
944
+ }, "strip", z.ZodTypeAny, {
945
+ node_type: "in" | "out";
946
+ node_group_id: number;
947
+ }, {
948
+ node_type: "in" | "out";
949
+ node_group_id: number;
950
+ }>, "many">>;
951
+ listen_protocol: z.ZodEffects<z.ZodNullable<z.ZodObject<{
952
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
953
+ username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
954
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
955
+ }, "strip", z.ZodTypeAny, {
956
+ type?: string | null | undefined;
957
+ username?: string | null | undefined;
958
+ password?: string | null | undefined;
959
+ }, {
960
+ type?: string | null | undefined;
961
+ username?: string | null | undefined;
962
+ password?: string | null | undefined;
963
+ }>>, {
964
+ type?: string | null | undefined;
965
+ username?: string | null | undefined;
966
+ password?: string | null | undefined;
967
+ } | null, {
968
+ type?: string | null | undefined;
969
+ username?: string | null | undefined;
970
+ password?: string | null | undefined;
971
+ } | null>;
972
+ forward_addresses_protocol: z.ZodEffects<z.ZodNullable<z.ZodObject<{
973
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
974
+ username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
975
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
976
+ }, "strip", z.ZodTypeAny, {
977
+ type?: string | null | undefined;
978
+ username?: string | null | undefined;
979
+ password?: string | null | undefined;
980
+ }, {
981
+ type?: string | null | undefined;
982
+ username?: string | null | undefined;
983
+ password?: string | null | undefined;
984
+ }>>, {
985
+ type?: string | null | undefined;
986
+ username?: string | null | undefined;
987
+ password?: string | null | undefined;
988
+ } | null, {
989
+ type?: string | null | undefined;
990
+ username?: string | null | undefined;
991
+ password?: string | null | undefined;
992
+ } | null>;
993
+ white_list: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
994
+ } & {
995
+ user_id: z.ZodNumber;
996
+ }, "strip", z.ZodTypeAny, {
997
+ name: string;
998
+ load_balance_type: "round" | "rand" | "fifo" | "hash" | "ll" | "lc";
999
+ user_id: number;
1000
+ status: "active" | "inactive";
1001
+ tunnel_type: "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic";
1002
+ category: "port_forward" | "remote_port_forward";
1003
+ listen_ip: string | null;
1004
+ listen_port: number | null;
1005
+ listen_protocol: {
1006
+ type?: string | null | undefined;
1007
+ username?: string | null | undefined;
1008
+ password?: string | null | undefined;
1009
+ } | null;
1010
+ white_list: string[] | null;
1011
+ forward_addresses: {
1012
+ weight: number;
1013
+ address: string;
1014
+ host?: string | null | undefined;
1015
+ }[];
1016
+ forward_addresses_protocol: {
1017
+ type?: string | null | undefined;
1018
+ username?: string | null | undefined;
1019
+ password?: string | null | undefined;
1020
+ } | null;
1021
+ ip_type: "auto" | "ipv4" | "ipv6";
1022
+ ip_limit: number | null;
1023
+ bandwidth_limit: number | null;
1024
+ proxy_protocol: boolean;
1025
+ in_node_group_id: number;
1026
+ out_node_group_id: number | null;
1027
+ tunnel_chains?: {
1028
+ node_type: "in" | "out";
1029
+ node_group_id: number;
1030
+ }[] | undefined;
1031
+ }, {
1032
+ name: string;
1033
+ load_balance_type: "round" | "rand" | "fifo" | "hash" | "ll" | "lc";
1034
+ user_id: number;
1035
+ status: "active" | "inactive";
1036
+ tunnel_type: "tcp" | "mtcp" | "udp" | "relayx" | "mtls" | "mwss" | "wss" | "tls" | "quic";
1037
+ category: "port_forward" | "remote_port_forward";
1038
+ listen_ip: string | null;
1039
+ listen_port: number | null;
1040
+ listen_protocol: {
1041
+ type?: string | null | undefined;
1042
+ username?: string | null | undefined;
1043
+ password?: string | null | undefined;
1044
+ } | null;
1045
+ white_list: string[] | null;
1046
+ forward_addresses: {
1047
+ weight: number;
1048
+ address: string;
1049
+ host?: string | null | undefined;
1050
+ }[];
1051
+ forward_addresses_protocol: {
1052
+ type?: string | null | undefined;
1053
+ username?: string | null | undefined;
1054
+ password?: string | null | undefined;
1055
+ } | null;
1056
+ ip_type: "auto" | "ipv4" | "ipv6";
1057
+ ip_limit: number | null;
1058
+ bandwidth_limit: number | null;
1059
+ proxy_protocol: boolean;
1060
+ in_node_group_id: number;
1061
+ out_node_group_id: number | null;
1062
+ tunnel_chains?: {
1063
+ node_type: "in" | "out";
1064
+ node_group_id: number;
1065
+ }[] | undefined;
1066
+ }>;
1067
+ export declare const DNSProviderRequestSchema: z.ZodObject<{
1068
+ name: z.ZodString;
1069
+ type: z.ZodNativeEnum<{
1070
+ cloudflare: "cloudflare";
1071
+ huawei: "huawei";
1072
+ }>;
1073
+ config: z.ZodRecord<z.ZodString, z.ZodString>;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ name: string;
1076
+ type: "cloudflare" | "huawei";
1077
+ config: Record<string, string>;
1078
+ }, {
1079
+ name: string;
1080
+ type: "cloudflare" | "huawei";
1081
+ config: Record<string, string>;
1082
+ }>;
1083
+ export declare const DNSProviderQuerySchema: z.ZodObject<{
1084
+ page: z.ZodDefault<z.ZodNumber>;
1085
+ perPage: z.ZodDefault<z.ZodNumber>;
1086
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
1087
+ id: string;
1088
+ desc: boolean;
1089
+ }[], string>>>;
1090
+ } & {
1091
+ name: z.ZodOptional<z.ZodString>;
1092
+ type: z.ZodOptional<z.ZodNativeEnum<{
1093
+ cloudflare: "cloudflare";
1094
+ huawei: "huawei";
1095
+ }>>;
1096
+ }, "strip", z.ZodTypeAny, {
1097
+ page: number;
1098
+ perPage: number;
1099
+ name?: string | undefined;
1100
+ type?: "cloudflare" | "huawei" | undefined;
1101
+ sort?: {
1102
+ id: string;
1103
+ desc: boolean;
1104
+ }[] | null | undefined;
1105
+ }, {
1106
+ name?: string | undefined;
1107
+ type?: "cloudflare" | "huawei" | undefined;
1108
+ sort?: string | null | undefined;
1109
+ page?: number | undefined;
1110
+ perPage?: number | undefined;
1111
+ }>;
1112
+ export declare const InNodeGroupDNSRequestSchema: z.ZodObject<{
1113
+ in_node_group_id: z.ZodNumber;
1114
+ dns_provider_id: z.ZodNumber;
1115
+ ttl: z.ZodDefault<z.ZodNumber>;
1116
+ custom_line: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
1117
+ ipv6: z.ZodDefault<z.ZodBoolean>;
1118
+ status: z.ZodDefault<z.ZodNativeEnum<{
1119
+ active: "active";
1120
+ inactive: "inactive";
1121
+ }>>;
1122
+ }, "strip", z.ZodTypeAny, {
1123
+ status: "active" | "inactive";
1124
+ in_node_group_id: number;
1125
+ ipv6: boolean;
1126
+ dns_provider_id: number;
1127
+ ttl: number;
1128
+ custom_line?: Record<string, string> | null | undefined;
1129
+ }, {
1130
+ in_node_group_id: number;
1131
+ dns_provider_id: number;
1132
+ status?: "active" | "inactive" | undefined;
1133
+ ipv6?: boolean | undefined;
1134
+ custom_line?: Record<string, string> | null | undefined;
1135
+ ttl?: number | undefined;
1136
+ }>;
1137
+ export declare const InNodeGroupDNSQuerySchema: z.ZodObject<{
1138
+ page: z.ZodDefault<z.ZodNumber>;
1139
+ perPage: z.ZodDefault<z.ZodNumber>;
1140
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, {
1141
+ id: string;
1142
+ desc: boolean;
1143
+ }[], string>>>;
1144
+ } & {
1145
+ in_node_group_id: z.ZodOptional<z.ZodNumber>;
1146
+ dns_provider_id: z.ZodOptional<z.ZodNumber>;
1147
+ status: z.ZodOptional<z.ZodNativeEnum<{
1148
+ active: "active";
1149
+ inactive: "inactive";
1150
+ }>>;
1151
+ }, "strip", z.ZodTypeAny, {
1152
+ page: number;
1153
+ perPage: number;
1154
+ status?: "active" | "inactive" | undefined;
1155
+ in_node_group_id?: number | undefined;
1156
+ dns_provider_id?: number | undefined;
1157
+ sort?: {
1158
+ id: string;
1159
+ desc: boolean;
1160
+ }[] | null | undefined;
1161
+ }, {
1162
+ status?: "active" | "inactive" | undefined;
1163
+ in_node_group_id?: number | undefined;
1164
+ dns_provider_id?: number | undefined;
1165
+ sort?: string | null | undefined;
1166
+ page?: number | undefined;
1167
+ perPage?: number | undefined;
1168
+ }>;
1169
+ export declare const BatchUserPlanRequestSchema: z.ZodObject<{
1170
+ ids: z.ZodArray<z.ZodNumber, "many">;
1171
+ add_days: z.ZodOptional<z.ZodNumber>;
1172
+ add_traffic: z.ZodOptional<z.ZodNumber>;
1173
+ }, "strip", z.ZodTypeAny, {
1174
+ ids: number[];
1175
+ add_days?: number | undefined;
1176
+ add_traffic?: number | undefined;
1177
+ }, {
1178
+ ids: number[];
1179
+ add_days?: number | undefined;
1180
+ add_traffic?: number | undefined;
1181
+ }>;