@remnawave/backend-contract 2.5.0 → 2.5.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 (31) hide show
  1. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +27 -27
  2. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +27 -27
  3. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +27 -27
  4. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +27 -27
  5. package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts +8 -8
  6. package/build/backend/commands/subscriptions/get-all-subscriptions.command.d.ts +12 -12
  7. package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts +4 -4
  8. package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.d.ts +8 -8
  9. package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.d.ts +8 -8
  10. package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.d.ts +8 -8
  11. package/build/backend/commands/system/get-nodes-metrics.command.d.ts +6 -6
  12. package/build/backend/commands/system/get-stats.command.d.ts +4 -4
  13. package/build/backend/constants/events/events.d.ts +9 -0
  14. package/build/backend/constants/events/events.d.ts.map +1 -1
  15. package/build/backend/constants/events/events.js +9 -1
  16. package/build/backend/models/index.d.ts +1 -0
  17. package/build/backend/models/index.d.ts.map +1 -1
  18. package/build/backend/models/index.js +1 -0
  19. package/build/backend/models/infra-billing-node.schema.d.ts +7 -7
  20. package/build/backend/models/subscription-info.schema.d.ts +4 -4
  21. package/build/backend/models/webhook/index.d.ts +2 -0
  22. package/build/backend/models/webhook/index.d.ts.map +1 -0
  23. package/build/backend/models/webhook/index.js +17 -0
  24. package/build/backend/models/webhook/webhook.schema.d.ts +2178 -0
  25. package/build/backend/models/webhook/webhook.schema.d.ts.map +1 -0
  26. package/build/backend/models/webhook/webhook.schema.js +105 -0
  27. package/build/frontend/constants/events/events.js +9 -1
  28. package/build/frontend/models/index.js +1 -0
  29. package/build/frontend/models/webhook/index.js +17 -0
  30. package/build/frontend/models/webhook/webhook.schema.js +105 -0
  31. package/package.json +1 -1
@@ -0,0 +1,2178 @@
1
+ import z from 'zod';
2
+ export declare const RemnawaveWebhookUserEvents: z.ZodObject<{
3
+ scope: z.ZodLiteral<"user">;
4
+ event: z.ZodEnum<["user.created", ...("user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected")[]]>;
5
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
6
+ data: z.ZodObject<{
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
+ }, "strip", z.ZodTypeAny, {
73
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
74
+ uuid: string;
75
+ createdAt: Date;
76
+ updatedAt: Date;
77
+ username: string;
78
+ id: number;
79
+ tag: string | null;
80
+ shortUuid: string;
81
+ trafficLimitBytes: number;
82
+ description: string | null;
83
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
84
+ expireAt: Date;
85
+ telegramId: number | null;
86
+ email: string | null;
87
+ hwidDeviceLimit: number | null;
88
+ externalSquadUuid: string | null;
89
+ trojanPassword: string;
90
+ vlessUuid: string;
91
+ ssPassword: string;
92
+ lastTriggeredThreshold: number;
93
+ subRevokedAt: Date | null;
94
+ subLastUserAgent: string | null;
95
+ subLastOpenedAt: Date | null;
96
+ lastTrafficResetAt: Date | null;
97
+ subscriptionUrl: string;
98
+ activeInternalSquads: {
99
+ uuid: string;
100
+ name: string;
101
+ }[];
102
+ userTraffic: {
103
+ usedTrafficBytes: number;
104
+ lifetimeUsedTrafficBytes: number;
105
+ onlineAt: Date | null;
106
+ firstConnectedAt: Date | null;
107
+ lastConnectedNodeUuid: string | null;
108
+ };
109
+ }, {
110
+ uuid: string;
111
+ createdAt: string;
112
+ updatedAt: string;
113
+ username: string;
114
+ id: number;
115
+ tag: string | null;
116
+ shortUuid: string;
117
+ description: string | null;
118
+ expireAt: string;
119
+ telegramId: number | null;
120
+ email: string | null;
121
+ hwidDeviceLimit: number | null;
122
+ externalSquadUuid: string | null;
123
+ trojanPassword: string;
124
+ vlessUuid: string;
125
+ ssPassword: string;
126
+ subRevokedAt: string | null;
127
+ subLastUserAgent: string | null;
128
+ subLastOpenedAt: string | null;
129
+ lastTrafficResetAt: string | null;
130
+ subscriptionUrl: string;
131
+ activeInternalSquads: {
132
+ uuid: string;
133
+ name: string;
134
+ }[];
135
+ userTraffic: {
136
+ usedTrafficBytes: number;
137
+ lifetimeUsedTrafficBytes: number;
138
+ onlineAt: string | null;
139
+ firstConnectedAt: string | null;
140
+ lastConnectedNodeUuid: string | null;
141
+ };
142
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
143
+ trafficLimitBytes?: number | undefined;
144
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
145
+ lastTriggeredThreshold?: number | undefined;
146
+ }>;
147
+ meta: z.ZodNullable<z.ZodObject<{
148
+ notConnectedAfterHours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
149
+ }, "strip", z.ZodTypeAny, {
150
+ notConnectedAfterHours?: number | null | undefined;
151
+ }, {
152
+ notConnectedAfterHours?: number | null | undefined;
153
+ }>>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ data: {
156
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
157
+ uuid: string;
158
+ createdAt: Date;
159
+ updatedAt: Date;
160
+ username: string;
161
+ id: number;
162
+ tag: string | null;
163
+ shortUuid: string;
164
+ trafficLimitBytes: number;
165
+ description: string | null;
166
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
167
+ expireAt: Date;
168
+ telegramId: number | null;
169
+ email: string | null;
170
+ hwidDeviceLimit: number | null;
171
+ externalSquadUuid: string | null;
172
+ trojanPassword: string;
173
+ vlessUuid: string;
174
+ ssPassword: string;
175
+ lastTriggeredThreshold: number;
176
+ subRevokedAt: Date | null;
177
+ subLastUserAgent: string | null;
178
+ subLastOpenedAt: Date | null;
179
+ lastTrafficResetAt: Date | null;
180
+ subscriptionUrl: string;
181
+ activeInternalSquads: {
182
+ uuid: string;
183
+ name: string;
184
+ }[];
185
+ userTraffic: {
186
+ usedTrafficBytes: number;
187
+ lifetimeUsedTrafficBytes: number;
188
+ onlineAt: Date | null;
189
+ firstConnectedAt: Date | null;
190
+ lastConnectedNodeUuid: string | null;
191
+ };
192
+ };
193
+ scope: "user";
194
+ event: "user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected";
195
+ timestamp: Date;
196
+ meta: {
197
+ notConnectedAfterHours?: number | null | undefined;
198
+ } | null;
199
+ }, {
200
+ data: {
201
+ uuid: string;
202
+ createdAt: string;
203
+ updatedAt: string;
204
+ username: string;
205
+ id: number;
206
+ tag: string | null;
207
+ shortUuid: string;
208
+ description: string | null;
209
+ expireAt: string;
210
+ telegramId: number | null;
211
+ email: string | null;
212
+ hwidDeviceLimit: number | null;
213
+ externalSquadUuid: string | null;
214
+ trojanPassword: string;
215
+ vlessUuid: string;
216
+ ssPassword: string;
217
+ subRevokedAt: string | null;
218
+ subLastUserAgent: string | null;
219
+ subLastOpenedAt: string | null;
220
+ lastTrafficResetAt: string | null;
221
+ subscriptionUrl: string;
222
+ activeInternalSquads: {
223
+ uuid: string;
224
+ name: string;
225
+ }[];
226
+ userTraffic: {
227
+ usedTrafficBytes: number;
228
+ lifetimeUsedTrafficBytes: number;
229
+ onlineAt: string | null;
230
+ firstConnectedAt: string | null;
231
+ lastConnectedNodeUuid: string | null;
232
+ };
233
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
234
+ trafficLimitBytes?: number | undefined;
235
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
236
+ lastTriggeredThreshold?: number | undefined;
237
+ };
238
+ scope: "user";
239
+ event: "user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected";
240
+ timestamp: string;
241
+ meta: {
242
+ notConnectedAfterHours?: number | null | undefined;
243
+ } | null;
244
+ }>;
245
+ export declare const RemnawaveWebhookUserHwidDevicesEvents: z.ZodObject<{
246
+ scope: z.ZodLiteral<"user_hwid_devices">;
247
+ event: z.ZodEnum<["user_hwid_devices.added", ...("user_hwid_devices.added" | "user_hwid_devices.deleted")[]]>;
248
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
249
+ data: z.ZodObject<{
250
+ user: z.ZodObject<{
251
+ uuid: z.ZodString;
252
+ id: z.ZodNumber;
253
+ shortUuid: z.ZodString;
254
+ username: z.ZodString;
255
+ status: z.ZodDefault<z.ZodNativeEnum<{
256
+ readonly ACTIVE: "ACTIVE";
257
+ readonly DISABLED: "DISABLED";
258
+ readonly LIMITED: "LIMITED";
259
+ readonly EXPIRED: "EXPIRED";
260
+ }>>;
261
+ trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
262
+ trafficLimitStrategy: z.ZodDefault<z.ZodNativeEnum<{
263
+ readonly NO_RESET: "NO_RESET";
264
+ readonly DAY: "DAY";
265
+ readonly WEEK: "WEEK";
266
+ readonly MONTH: "MONTH";
267
+ }>>;
268
+ expireAt: z.ZodEffects<z.ZodString, Date, string>;
269
+ telegramId: z.ZodNullable<z.ZodNumber>;
270
+ email: z.ZodNullable<z.ZodString>;
271
+ description: z.ZodNullable<z.ZodString>;
272
+ tag: z.ZodNullable<z.ZodString>;
273
+ hwidDeviceLimit: z.ZodNullable<z.ZodNumber>;
274
+ externalSquadUuid: z.ZodNullable<z.ZodString>;
275
+ trojanPassword: z.ZodString;
276
+ vlessUuid: z.ZodString;
277
+ ssPassword: z.ZodString;
278
+ lastTriggeredThreshold: z.ZodDefault<z.ZodNumber>;
279
+ subRevokedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
280
+ subLastUserAgent: z.ZodNullable<z.ZodString>;
281
+ subLastOpenedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
282
+ lastTrafficResetAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
283
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
284
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
285
+ } & {
286
+ subscriptionUrl: z.ZodString;
287
+ activeInternalSquads: z.ZodArray<z.ZodObject<{
288
+ uuid: z.ZodString;
289
+ name: z.ZodString;
290
+ }, "strip", z.ZodTypeAny, {
291
+ uuid: string;
292
+ name: string;
293
+ }, {
294
+ uuid: string;
295
+ name: string;
296
+ }>, "many">;
297
+ userTraffic: z.ZodObject<{
298
+ usedTrafficBytes: z.ZodNumber;
299
+ lifetimeUsedTrafficBytes: z.ZodNumber;
300
+ onlineAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
301
+ firstConnectedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
302
+ lastConnectedNodeUuid: z.ZodNullable<z.ZodString>;
303
+ }, "strip", z.ZodTypeAny, {
304
+ usedTrafficBytes: number;
305
+ lifetimeUsedTrafficBytes: number;
306
+ onlineAt: Date | null;
307
+ firstConnectedAt: Date | null;
308
+ lastConnectedNodeUuid: string | null;
309
+ }, {
310
+ usedTrafficBytes: number;
311
+ lifetimeUsedTrafficBytes: number;
312
+ onlineAt: string | null;
313
+ firstConnectedAt: string | null;
314
+ lastConnectedNodeUuid: string | null;
315
+ }>;
316
+ }, "strip", z.ZodTypeAny, {
317
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
318
+ uuid: string;
319
+ createdAt: Date;
320
+ updatedAt: Date;
321
+ username: string;
322
+ id: number;
323
+ tag: string | null;
324
+ shortUuid: string;
325
+ trafficLimitBytes: number;
326
+ description: string | null;
327
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
328
+ expireAt: Date;
329
+ telegramId: number | null;
330
+ email: string | null;
331
+ hwidDeviceLimit: number | null;
332
+ externalSquadUuid: string | null;
333
+ trojanPassword: string;
334
+ vlessUuid: string;
335
+ ssPassword: string;
336
+ lastTriggeredThreshold: number;
337
+ subRevokedAt: Date | null;
338
+ subLastUserAgent: string | null;
339
+ subLastOpenedAt: Date | null;
340
+ lastTrafficResetAt: Date | null;
341
+ subscriptionUrl: string;
342
+ activeInternalSquads: {
343
+ uuid: string;
344
+ name: string;
345
+ }[];
346
+ userTraffic: {
347
+ usedTrafficBytes: number;
348
+ lifetimeUsedTrafficBytes: number;
349
+ onlineAt: Date | null;
350
+ firstConnectedAt: Date | null;
351
+ lastConnectedNodeUuid: string | null;
352
+ };
353
+ }, {
354
+ uuid: string;
355
+ createdAt: string;
356
+ updatedAt: string;
357
+ username: string;
358
+ id: number;
359
+ tag: string | null;
360
+ shortUuid: string;
361
+ description: string | null;
362
+ expireAt: string;
363
+ telegramId: number | null;
364
+ email: string | null;
365
+ hwidDeviceLimit: number | null;
366
+ externalSquadUuid: string | null;
367
+ trojanPassword: string;
368
+ vlessUuid: string;
369
+ ssPassword: string;
370
+ subRevokedAt: string | null;
371
+ subLastUserAgent: string | null;
372
+ subLastOpenedAt: string | null;
373
+ lastTrafficResetAt: string | null;
374
+ subscriptionUrl: string;
375
+ activeInternalSquads: {
376
+ uuid: string;
377
+ name: string;
378
+ }[];
379
+ userTraffic: {
380
+ usedTrafficBytes: number;
381
+ lifetimeUsedTrafficBytes: number;
382
+ onlineAt: string | null;
383
+ firstConnectedAt: string | null;
384
+ lastConnectedNodeUuid: string | null;
385
+ };
386
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
387
+ trafficLimitBytes?: number | undefined;
388
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
389
+ lastTriggeredThreshold?: number | undefined;
390
+ }>;
391
+ hwidUserDevice: z.ZodObject<{
392
+ hwid: z.ZodString;
393
+ userUuid: z.ZodString;
394
+ platform: z.ZodNullable<z.ZodString>;
395
+ osVersion: z.ZodNullable<z.ZodString>;
396
+ deviceModel: z.ZodNullable<z.ZodString>;
397
+ userAgent: z.ZodNullable<z.ZodString>;
398
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
399
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
400
+ }, "strip", z.ZodTypeAny, {
401
+ hwid: string;
402
+ createdAt: Date;
403
+ updatedAt: Date;
404
+ userUuid: string;
405
+ platform: string | null;
406
+ osVersion: string | null;
407
+ deviceModel: string | null;
408
+ userAgent: string | null;
409
+ }, {
410
+ hwid: string;
411
+ createdAt: string;
412
+ updatedAt: string;
413
+ userUuid: string;
414
+ platform: string | null;
415
+ osVersion: string | null;
416
+ deviceModel: string | null;
417
+ userAgent: string | null;
418
+ }>;
419
+ }, "strip", z.ZodTypeAny, {
420
+ user: {
421
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
422
+ uuid: string;
423
+ createdAt: Date;
424
+ updatedAt: Date;
425
+ username: string;
426
+ id: number;
427
+ tag: string | null;
428
+ shortUuid: string;
429
+ trafficLimitBytes: number;
430
+ description: string | null;
431
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
432
+ expireAt: Date;
433
+ telegramId: number | null;
434
+ email: string | null;
435
+ hwidDeviceLimit: number | null;
436
+ externalSquadUuid: string | null;
437
+ trojanPassword: string;
438
+ vlessUuid: string;
439
+ ssPassword: string;
440
+ lastTriggeredThreshold: number;
441
+ subRevokedAt: Date | null;
442
+ subLastUserAgent: string | null;
443
+ subLastOpenedAt: Date | null;
444
+ lastTrafficResetAt: Date | null;
445
+ subscriptionUrl: string;
446
+ activeInternalSquads: {
447
+ uuid: string;
448
+ name: string;
449
+ }[];
450
+ userTraffic: {
451
+ usedTrafficBytes: number;
452
+ lifetimeUsedTrafficBytes: number;
453
+ onlineAt: Date | null;
454
+ firstConnectedAt: Date | null;
455
+ lastConnectedNodeUuid: string | null;
456
+ };
457
+ };
458
+ hwidUserDevice: {
459
+ hwid: string;
460
+ createdAt: Date;
461
+ updatedAt: Date;
462
+ userUuid: string;
463
+ platform: string | null;
464
+ osVersion: string | null;
465
+ deviceModel: string | null;
466
+ userAgent: string | null;
467
+ };
468
+ }, {
469
+ user: {
470
+ uuid: string;
471
+ createdAt: string;
472
+ updatedAt: string;
473
+ username: string;
474
+ id: number;
475
+ tag: string | null;
476
+ shortUuid: string;
477
+ description: string | null;
478
+ expireAt: string;
479
+ telegramId: number | null;
480
+ email: string | null;
481
+ hwidDeviceLimit: number | null;
482
+ externalSquadUuid: string | null;
483
+ trojanPassword: string;
484
+ vlessUuid: string;
485
+ ssPassword: string;
486
+ subRevokedAt: string | null;
487
+ subLastUserAgent: string | null;
488
+ subLastOpenedAt: string | null;
489
+ lastTrafficResetAt: string | null;
490
+ subscriptionUrl: string;
491
+ activeInternalSquads: {
492
+ uuid: string;
493
+ name: string;
494
+ }[];
495
+ userTraffic: {
496
+ usedTrafficBytes: number;
497
+ lifetimeUsedTrafficBytes: number;
498
+ onlineAt: string | null;
499
+ firstConnectedAt: string | null;
500
+ lastConnectedNodeUuid: string | null;
501
+ };
502
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
503
+ trafficLimitBytes?: number | undefined;
504
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
505
+ lastTriggeredThreshold?: number | undefined;
506
+ };
507
+ hwidUserDevice: {
508
+ hwid: string;
509
+ createdAt: string;
510
+ updatedAt: string;
511
+ userUuid: string;
512
+ platform: string | null;
513
+ osVersion: string | null;
514
+ deviceModel: string | null;
515
+ userAgent: string | null;
516
+ };
517
+ }>;
518
+ }, "strip", z.ZodTypeAny, {
519
+ data: {
520
+ user: {
521
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
522
+ uuid: string;
523
+ createdAt: Date;
524
+ updatedAt: Date;
525
+ username: string;
526
+ id: number;
527
+ tag: string | null;
528
+ shortUuid: string;
529
+ trafficLimitBytes: number;
530
+ description: string | null;
531
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
532
+ expireAt: Date;
533
+ telegramId: number | null;
534
+ email: string | null;
535
+ hwidDeviceLimit: number | null;
536
+ externalSquadUuid: string | null;
537
+ trojanPassword: string;
538
+ vlessUuid: string;
539
+ ssPassword: string;
540
+ lastTriggeredThreshold: number;
541
+ subRevokedAt: Date | null;
542
+ subLastUserAgent: string | null;
543
+ subLastOpenedAt: Date | null;
544
+ lastTrafficResetAt: Date | null;
545
+ subscriptionUrl: string;
546
+ activeInternalSquads: {
547
+ uuid: string;
548
+ name: string;
549
+ }[];
550
+ userTraffic: {
551
+ usedTrafficBytes: number;
552
+ lifetimeUsedTrafficBytes: number;
553
+ onlineAt: Date | null;
554
+ firstConnectedAt: Date | null;
555
+ lastConnectedNodeUuid: string | null;
556
+ };
557
+ };
558
+ hwidUserDevice: {
559
+ hwid: string;
560
+ createdAt: Date;
561
+ updatedAt: Date;
562
+ userUuid: string;
563
+ platform: string | null;
564
+ osVersion: string | null;
565
+ deviceModel: string | null;
566
+ userAgent: string | null;
567
+ };
568
+ };
569
+ scope: "user_hwid_devices";
570
+ event: "user_hwid_devices.added" | "user_hwid_devices.deleted";
571
+ timestamp: Date;
572
+ }, {
573
+ data: {
574
+ user: {
575
+ uuid: string;
576
+ createdAt: string;
577
+ updatedAt: string;
578
+ username: string;
579
+ id: number;
580
+ tag: string | null;
581
+ shortUuid: string;
582
+ description: string | null;
583
+ expireAt: string;
584
+ telegramId: number | null;
585
+ email: string | null;
586
+ hwidDeviceLimit: number | null;
587
+ externalSquadUuid: string | null;
588
+ trojanPassword: string;
589
+ vlessUuid: string;
590
+ ssPassword: string;
591
+ subRevokedAt: string | null;
592
+ subLastUserAgent: string | null;
593
+ subLastOpenedAt: string | null;
594
+ lastTrafficResetAt: string | null;
595
+ subscriptionUrl: string;
596
+ activeInternalSquads: {
597
+ uuid: string;
598
+ name: string;
599
+ }[];
600
+ userTraffic: {
601
+ usedTrafficBytes: number;
602
+ lifetimeUsedTrafficBytes: number;
603
+ onlineAt: string | null;
604
+ firstConnectedAt: string | null;
605
+ lastConnectedNodeUuid: string | null;
606
+ };
607
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
608
+ trafficLimitBytes?: number | undefined;
609
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
610
+ lastTriggeredThreshold?: number | undefined;
611
+ };
612
+ hwidUserDevice: {
613
+ hwid: string;
614
+ createdAt: string;
615
+ updatedAt: string;
616
+ userUuid: string;
617
+ platform: string | null;
618
+ osVersion: string | null;
619
+ deviceModel: string | null;
620
+ userAgent: string | null;
621
+ };
622
+ };
623
+ scope: "user_hwid_devices";
624
+ event: "user_hwid_devices.added" | "user_hwid_devices.deleted";
625
+ timestamp: string;
626
+ }>;
627
+ export declare const RemnawaveWebhookNodeEvents: z.ZodObject<{
628
+ scope: z.ZodLiteral<"node">;
629
+ event: z.ZodEnum<["node.created", ...("node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify")[]]>;
630
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
631
+ data: z.ZodObject<{
632
+ uuid: z.ZodString;
633
+ name: z.ZodString;
634
+ address: z.ZodString;
635
+ port: z.ZodNullable<z.ZodNumber>;
636
+ isConnected: z.ZodBoolean;
637
+ isDisabled: z.ZodBoolean;
638
+ isConnecting: z.ZodBoolean;
639
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
640
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
641
+ xrayVersion: z.ZodNullable<z.ZodString>;
642
+ nodeVersion: z.ZodNullable<z.ZodString>;
643
+ xrayUptime: z.ZodString;
644
+ isTrafficTrackingActive: z.ZodBoolean;
645
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
646
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
647
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
648
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
649
+ usersOnline: z.ZodNullable<z.ZodNumber>;
650
+ viewPosition: z.ZodNumber;
651
+ countryCode: z.ZodString;
652
+ consumptionMultiplier: z.ZodNumber;
653
+ tags: z.ZodArray<z.ZodString, "many">;
654
+ cpuCount: z.ZodNullable<z.ZodNumber>;
655
+ cpuModel: z.ZodNullable<z.ZodString>;
656
+ totalRam: z.ZodNullable<z.ZodString>;
657
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
658
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
659
+ configProfile: z.ZodObject<{
660
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
661
+ activeInbounds: z.ZodArray<z.ZodObject<{
662
+ uuid: z.ZodString;
663
+ profileUuid: z.ZodString;
664
+ tag: z.ZodString;
665
+ type: z.ZodString;
666
+ network: z.ZodNullable<z.ZodString>;
667
+ security: z.ZodNullable<z.ZodString>;
668
+ port: z.ZodNullable<z.ZodNumber>;
669
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
670
+ }, "strip", z.ZodTypeAny, {
671
+ type: string;
672
+ uuid: string;
673
+ profileUuid: string;
674
+ tag: string;
675
+ network: string | null;
676
+ security: string | null;
677
+ port: number | null;
678
+ rawInbound?: unknown;
679
+ }, {
680
+ type: string;
681
+ uuid: string;
682
+ profileUuid: string;
683
+ tag: string;
684
+ network: string | null;
685
+ security: string | null;
686
+ port: number | null;
687
+ rawInbound?: unknown;
688
+ }>, "many">;
689
+ }, "strip", z.ZodTypeAny, {
690
+ activeConfigProfileUuid: string | null;
691
+ activeInbounds: {
692
+ type: string;
693
+ uuid: string;
694
+ profileUuid: string;
695
+ tag: string;
696
+ network: string | null;
697
+ security: string | null;
698
+ port: number | null;
699
+ rawInbound?: unknown;
700
+ }[];
701
+ }, {
702
+ activeConfigProfileUuid: string | null;
703
+ activeInbounds: {
704
+ type: string;
705
+ uuid: string;
706
+ profileUuid: string;
707
+ tag: string;
708
+ network: string | null;
709
+ security: string | null;
710
+ port: number | null;
711
+ rawInbound?: unknown;
712
+ }[];
713
+ }>;
714
+ providerUuid: z.ZodNullable<z.ZodString>;
715
+ provider: z.ZodNullable<z.ZodObject<{
716
+ uuid: z.ZodString;
717
+ name: z.ZodString;
718
+ faviconLink: z.ZodNullable<z.ZodString>;
719
+ loginUrl: z.ZodNullable<z.ZodString>;
720
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
721
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
722
+ }, "strip", z.ZodTypeAny, {
723
+ uuid: string;
724
+ createdAt: Date;
725
+ updatedAt: Date;
726
+ name: string;
727
+ faviconLink: string | null;
728
+ loginUrl: string | null;
729
+ }, {
730
+ uuid: string;
731
+ createdAt: string;
732
+ updatedAt: string;
733
+ name: string;
734
+ faviconLink: string | null;
735
+ loginUrl: string | null;
736
+ }>>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ tags: string[];
739
+ uuid: string;
740
+ createdAt: Date;
741
+ updatedAt: Date;
742
+ provider: {
743
+ uuid: string;
744
+ createdAt: Date;
745
+ updatedAt: Date;
746
+ name: string;
747
+ faviconLink: string | null;
748
+ loginUrl: string | null;
749
+ } | null;
750
+ countryCode: string;
751
+ name: string;
752
+ port: number | null;
753
+ viewPosition: number;
754
+ trafficLimitBytes: number | null;
755
+ address: string;
756
+ isDisabled: boolean;
757
+ isConnected: boolean;
758
+ isConnecting: boolean;
759
+ lastStatusChange: Date | null;
760
+ lastStatusMessage: string | null;
761
+ xrayVersion: string | null;
762
+ nodeVersion: string | null;
763
+ xrayUptime: string;
764
+ isTrafficTrackingActive: boolean;
765
+ trafficResetDay: number | null;
766
+ trafficUsedBytes: number | null;
767
+ notifyPercent: number | null;
768
+ usersOnline: number | null;
769
+ consumptionMultiplier: number;
770
+ cpuCount: number | null;
771
+ cpuModel: string | null;
772
+ totalRam: string | null;
773
+ configProfile: {
774
+ activeConfigProfileUuid: string | null;
775
+ activeInbounds: {
776
+ type: string;
777
+ uuid: string;
778
+ profileUuid: string;
779
+ tag: string;
780
+ network: string | null;
781
+ security: string | null;
782
+ port: number | null;
783
+ rawInbound?: unknown;
784
+ }[];
785
+ };
786
+ providerUuid: string | null;
787
+ }, {
788
+ tags: string[];
789
+ uuid: string;
790
+ createdAt: string;
791
+ updatedAt: string;
792
+ provider: {
793
+ uuid: string;
794
+ createdAt: string;
795
+ updatedAt: string;
796
+ name: string;
797
+ faviconLink: string | null;
798
+ loginUrl: string | null;
799
+ } | null;
800
+ countryCode: string;
801
+ name: string;
802
+ port: number | null;
803
+ viewPosition: number;
804
+ trafficLimitBytes: number | null;
805
+ address: string;
806
+ isDisabled: boolean;
807
+ isConnected: boolean;
808
+ isConnecting: boolean;
809
+ lastStatusChange: string | null;
810
+ lastStatusMessage: string | null;
811
+ xrayVersion: string | null;
812
+ nodeVersion: string | null;
813
+ xrayUptime: string;
814
+ isTrafficTrackingActive: boolean;
815
+ trafficResetDay: number | null;
816
+ trafficUsedBytes: number | null;
817
+ notifyPercent: number | null;
818
+ usersOnline: number | null;
819
+ consumptionMultiplier: number;
820
+ cpuCount: number | null;
821
+ cpuModel: string | null;
822
+ totalRam: string | null;
823
+ configProfile: {
824
+ activeConfigProfileUuid: string | null;
825
+ activeInbounds: {
826
+ type: string;
827
+ uuid: string;
828
+ profileUuid: string;
829
+ tag: string;
830
+ network: string | null;
831
+ security: string | null;
832
+ port: number | null;
833
+ rawInbound?: unknown;
834
+ }[];
835
+ };
836
+ providerUuid: string | null;
837
+ }>;
838
+ }, "strip", z.ZodTypeAny, {
839
+ data: {
840
+ tags: string[];
841
+ uuid: string;
842
+ createdAt: Date;
843
+ updatedAt: Date;
844
+ provider: {
845
+ uuid: string;
846
+ createdAt: Date;
847
+ updatedAt: Date;
848
+ name: string;
849
+ faviconLink: string | null;
850
+ loginUrl: string | null;
851
+ } | null;
852
+ countryCode: string;
853
+ name: string;
854
+ port: number | null;
855
+ viewPosition: number;
856
+ trafficLimitBytes: number | null;
857
+ address: string;
858
+ isDisabled: boolean;
859
+ isConnected: boolean;
860
+ isConnecting: boolean;
861
+ lastStatusChange: Date | null;
862
+ lastStatusMessage: string | null;
863
+ xrayVersion: string | null;
864
+ nodeVersion: string | null;
865
+ xrayUptime: string;
866
+ isTrafficTrackingActive: boolean;
867
+ trafficResetDay: number | null;
868
+ trafficUsedBytes: number | null;
869
+ notifyPercent: number | null;
870
+ usersOnline: number | null;
871
+ consumptionMultiplier: number;
872
+ cpuCount: number | null;
873
+ cpuModel: string | null;
874
+ totalRam: string | null;
875
+ configProfile: {
876
+ activeConfigProfileUuid: string | null;
877
+ activeInbounds: {
878
+ type: string;
879
+ uuid: string;
880
+ profileUuid: string;
881
+ tag: string;
882
+ network: string | null;
883
+ security: string | null;
884
+ port: number | null;
885
+ rawInbound?: unknown;
886
+ }[];
887
+ };
888
+ providerUuid: string | null;
889
+ };
890
+ scope: "node";
891
+ event: "node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify";
892
+ timestamp: Date;
893
+ }, {
894
+ data: {
895
+ tags: string[];
896
+ uuid: string;
897
+ createdAt: string;
898
+ updatedAt: string;
899
+ provider: {
900
+ uuid: string;
901
+ createdAt: string;
902
+ updatedAt: string;
903
+ name: string;
904
+ faviconLink: string | null;
905
+ loginUrl: string | null;
906
+ } | null;
907
+ countryCode: string;
908
+ name: string;
909
+ port: number | null;
910
+ viewPosition: number;
911
+ trafficLimitBytes: number | null;
912
+ address: string;
913
+ isDisabled: boolean;
914
+ isConnected: boolean;
915
+ isConnecting: boolean;
916
+ lastStatusChange: string | null;
917
+ lastStatusMessage: string | null;
918
+ xrayVersion: string | null;
919
+ nodeVersion: string | null;
920
+ xrayUptime: string;
921
+ isTrafficTrackingActive: boolean;
922
+ trafficResetDay: number | null;
923
+ trafficUsedBytes: number | null;
924
+ notifyPercent: number | null;
925
+ usersOnline: number | null;
926
+ consumptionMultiplier: number;
927
+ cpuCount: number | null;
928
+ cpuModel: string | null;
929
+ totalRam: string | null;
930
+ configProfile: {
931
+ activeConfigProfileUuid: string | null;
932
+ activeInbounds: {
933
+ type: string;
934
+ uuid: string;
935
+ profileUuid: string;
936
+ tag: string;
937
+ network: string | null;
938
+ security: string | null;
939
+ port: number | null;
940
+ rawInbound?: unknown;
941
+ }[];
942
+ };
943
+ providerUuid: string | null;
944
+ };
945
+ scope: "node";
946
+ event: "node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify";
947
+ timestamp: string;
948
+ }>;
949
+ export declare const RemnawaveWebhookServiceEvents: z.ZodObject<{
950
+ scope: z.ZodLiteral<"service">;
951
+ event: z.ZodEnum<["service.panel_started", ...("service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success")[]]>;
952
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
953
+ data: z.ZodObject<{
954
+ loginAttempt: z.ZodOptional<z.ZodObject<{
955
+ username: z.ZodString;
956
+ ip: z.ZodString;
957
+ userAgent: z.ZodString;
958
+ description: z.ZodOptional<z.ZodString>;
959
+ password: z.ZodOptional<z.ZodString>;
960
+ }, "strip", z.ZodTypeAny, {
961
+ username: string;
962
+ ip: string;
963
+ userAgent: string;
964
+ password?: string | undefined;
965
+ description?: string | undefined;
966
+ }, {
967
+ username: string;
968
+ ip: string;
969
+ userAgent: string;
970
+ password?: string | undefined;
971
+ description?: string | undefined;
972
+ }>>;
973
+ panelVersion: z.ZodOptional<z.ZodString>;
974
+ }, "strip", z.ZodTypeAny, {
975
+ loginAttempt?: {
976
+ username: string;
977
+ ip: string;
978
+ userAgent: string;
979
+ password?: string | undefined;
980
+ description?: string | undefined;
981
+ } | undefined;
982
+ panelVersion?: string | undefined;
983
+ }, {
984
+ loginAttempt?: {
985
+ username: string;
986
+ ip: string;
987
+ userAgent: string;
988
+ password?: string | undefined;
989
+ description?: string | undefined;
990
+ } | undefined;
991
+ panelVersion?: string | undefined;
992
+ }>;
993
+ }, "strip", z.ZodTypeAny, {
994
+ data: {
995
+ loginAttempt?: {
996
+ username: string;
997
+ ip: string;
998
+ userAgent: string;
999
+ password?: string | undefined;
1000
+ description?: string | undefined;
1001
+ } | undefined;
1002
+ panelVersion?: string | undefined;
1003
+ };
1004
+ scope: "service";
1005
+ event: "service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success";
1006
+ timestamp: Date;
1007
+ }, {
1008
+ data: {
1009
+ loginAttempt?: {
1010
+ username: string;
1011
+ ip: string;
1012
+ userAgent: string;
1013
+ password?: string | undefined;
1014
+ description?: string | undefined;
1015
+ } | undefined;
1016
+ panelVersion?: string | undefined;
1017
+ };
1018
+ scope: "service";
1019
+ event: "service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success";
1020
+ timestamp: string;
1021
+ }>;
1022
+ export declare const RemnawaveWebhookErrorsEvents: z.ZodObject<{
1023
+ scope: z.ZodLiteral<"errors">;
1024
+ event: z.ZodEnum<["errors.bandwidth_usage_threshold_reached_max_notifications", ..."errors.bandwidth_usage_threshold_reached_max_notifications"[]]>;
1025
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
1026
+ data: z.ZodObject<{
1027
+ description: z.ZodString;
1028
+ }, "strip", z.ZodTypeAny, {
1029
+ description: string;
1030
+ }, {
1031
+ description: string;
1032
+ }>;
1033
+ }, "strip", z.ZodTypeAny, {
1034
+ data: {
1035
+ description: string;
1036
+ };
1037
+ scope: "errors";
1038
+ event: "errors.bandwidth_usage_threshold_reached_max_notifications";
1039
+ timestamp: Date;
1040
+ }, {
1041
+ data: {
1042
+ description: string;
1043
+ };
1044
+ scope: "errors";
1045
+ event: "errors.bandwidth_usage_threshold_reached_max_notifications";
1046
+ timestamp: string;
1047
+ }>;
1048
+ export declare const RemnawaveWebhookCrmEvents: z.ZodObject<{
1049
+ scope: z.ZodLiteral<"crm">;
1050
+ event: z.ZodEnum<["crm.infra_billing_node_payment_in_7_days", ...("crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days")[]]>;
1051
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
1052
+ data: z.ZodObject<{
1053
+ providerName: z.ZodString;
1054
+ nodeName: z.ZodString;
1055
+ nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
1056
+ loginUrl: z.ZodString;
1057
+ }, "strip", z.ZodTypeAny, {
1058
+ nodeName: string;
1059
+ loginUrl: string;
1060
+ nextBillingAt: Date;
1061
+ providerName: string;
1062
+ }, {
1063
+ nodeName: string;
1064
+ loginUrl: string;
1065
+ nextBillingAt: string;
1066
+ providerName: string;
1067
+ }>;
1068
+ }, "strip", z.ZodTypeAny, {
1069
+ data: {
1070
+ nodeName: string;
1071
+ loginUrl: string;
1072
+ nextBillingAt: Date;
1073
+ providerName: string;
1074
+ };
1075
+ scope: "crm";
1076
+ event: "crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days";
1077
+ timestamp: Date;
1078
+ }, {
1079
+ data: {
1080
+ nodeName: string;
1081
+ loginUrl: string;
1082
+ nextBillingAt: string;
1083
+ providerName: string;
1084
+ };
1085
+ scope: "crm";
1086
+ event: "crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days";
1087
+ timestamp: string;
1088
+ }>;
1089
+ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
1090
+ scope: z.ZodLiteral<"user">;
1091
+ event: z.ZodEnum<["user.created", ...("user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected")[]]>;
1092
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
1093
+ data: z.ZodObject<{
1094
+ uuid: z.ZodString;
1095
+ id: z.ZodNumber;
1096
+ shortUuid: z.ZodString;
1097
+ username: z.ZodString;
1098
+ status: z.ZodDefault<z.ZodNativeEnum<{
1099
+ readonly ACTIVE: "ACTIVE";
1100
+ readonly DISABLED: "DISABLED";
1101
+ readonly LIMITED: "LIMITED";
1102
+ readonly EXPIRED: "EXPIRED";
1103
+ }>>;
1104
+ trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
1105
+ trafficLimitStrategy: z.ZodDefault<z.ZodNativeEnum<{
1106
+ readonly NO_RESET: "NO_RESET";
1107
+ readonly DAY: "DAY";
1108
+ readonly WEEK: "WEEK";
1109
+ readonly MONTH: "MONTH";
1110
+ }>>;
1111
+ expireAt: z.ZodEffects<z.ZodString, Date, string>;
1112
+ telegramId: z.ZodNullable<z.ZodNumber>;
1113
+ email: z.ZodNullable<z.ZodString>;
1114
+ description: z.ZodNullable<z.ZodString>;
1115
+ tag: z.ZodNullable<z.ZodString>;
1116
+ hwidDeviceLimit: z.ZodNullable<z.ZodNumber>;
1117
+ externalSquadUuid: z.ZodNullable<z.ZodString>;
1118
+ trojanPassword: z.ZodString;
1119
+ vlessUuid: z.ZodString;
1120
+ ssPassword: z.ZodString;
1121
+ lastTriggeredThreshold: z.ZodDefault<z.ZodNumber>;
1122
+ subRevokedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1123
+ subLastUserAgent: z.ZodNullable<z.ZodString>;
1124
+ subLastOpenedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1125
+ lastTrafficResetAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1126
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
1127
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
1128
+ } & {
1129
+ subscriptionUrl: z.ZodString;
1130
+ activeInternalSquads: z.ZodArray<z.ZodObject<{
1131
+ uuid: z.ZodString;
1132
+ name: z.ZodString;
1133
+ }, "strip", z.ZodTypeAny, {
1134
+ uuid: string;
1135
+ name: string;
1136
+ }, {
1137
+ uuid: string;
1138
+ name: string;
1139
+ }>, "many">;
1140
+ userTraffic: z.ZodObject<{
1141
+ usedTrafficBytes: z.ZodNumber;
1142
+ lifetimeUsedTrafficBytes: z.ZodNumber;
1143
+ onlineAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1144
+ firstConnectedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1145
+ lastConnectedNodeUuid: z.ZodNullable<z.ZodString>;
1146
+ }, "strip", z.ZodTypeAny, {
1147
+ usedTrafficBytes: number;
1148
+ lifetimeUsedTrafficBytes: number;
1149
+ onlineAt: Date | null;
1150
+ firstConnectedAt: Date | null;
1151
+ lastConnectedNodeUuid: string | null;
1152
+ }, {
1153
+ usedTrafficBytes: number;
1154
+ lifetimeUsedTrafficBytes: number;
1155
+ onlineAt: string | null;
1156
+ firstConnectedAt: string | null;
1157
+ lastConnectedNodeUuid: string | null;
1158
+ }>;
1159
+ }, "strip", z.ZodTypeAny, {
1160
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
1161
+ uuid: string;
1162
+ createdAt: Date;
1163
+ updatedAt: Date;
1164
+ username: string;
1165
+ id: number;
1166
+ tag: string | null;
1167
+ shortUuid: string;
1168
+ trafficLimitBytes: number;
1169
+ description: string | null;
1170
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
1171
+ expireAt: Date;
1172
+ telegramId: number | null;
1173
+ email: string | null;
1174
+ hwidDeviceLimit: number | null;
1175
+ externalSquadUuid: string | null;
1176
+ trojanPassword: string;
1177
+ vlessUuid: string;
1178
+ ssPassword: string;
1179
+ lastTriggeredThreshold: number;
1180
+ subRevokedAt: Date | null;
1181
+ subLastUserAgent: string | null;
1182
+ subLastOpenedAt: Date | null;
1183
+ lastTrafficResetAt: Date | null;
1184
+ subscriptionUrl: string;
1185
+ activeInternalSquads: {
1186
+ uuid: string;
1187
+ name: string;
1188
+ }[];
1189
+ userTraffic: {
1190
+ usedTrafficBytes: number;
1191
+ lifetimeUsedTrafficBytes: number;
1192
+ onlineAt: Date | null;
1193
+ firstConnectedAt: Date | null;
1194
+ lastConnectedNodeUuid: string | null;
1195
+ };
1196
+ }, {
1197
+ uuid: string;
1198
+ createdAt: string;
1199
+ updatedAt: string;
1200
+ username: string;
1201
+ id: number;
1202
+ tag: string | null;
1203
+ shortUuid: string;
1204
+ description: string | null;
1205
+ expireAt: string;
1206
+ telegramId: number | null;
1207
+ email: string | null;
1208
+ hwidDeviceLimit: number | null;
1209
+ externalSquadUuid: string | null;
1210
+ trojanPassword: string;
1211
+ vlessUuid: string;
1212
+ ssPassword: string;
1213
+ subRevokedAt: string | null;
1214
+ subLastUserAgent: string | null;
1215
+ subLastOpenedAt: string | null;
1216
+ lastTrafficResetAt: string | null;
1217
+ subscriptionUrl: string;
1218
+ activeInternalSquads: {
1219
+ uuid: string;
1220
+ name: string;
1221
+ }[];
1222
+ userTraffic: {
1223
+ usedTrafficBytes: number;
1224
+ lifetimeUsedTrafficBytes: number;
1225
+ onlineAt: string | null;
1226
+ firstConnectedAt: string | null;
1227
+ lastConnectedNodeUuid: string | null;
1228
+ };
1229
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
1230
+ trafficLimitBytes?: number | undefined;
1231
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
1232
+ lastTriggeredThreshold?: number | undefined;
1233
+ }>;
1234
+ meta: z.ZodNullable<z.ZodObject<{
1235
+ notConnectedAfterHours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1236
+ }, "strip", z.ZodTypeAny, {
1237
+ notConnectedAfterHours?: number | null | undefined;
1238
+ }, {
1239
+ notConnectedAfterHours?: number | null | undefined;
1240
+ }>>;
1241
+ }, "strip", z.ZodTypeAny, {
1242
+ data: {
1243
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
1244
+ uuid: string;
1245
+ createdAt: Date;
1246
+ updatedAt: Date;
1247
+ username: string;
1248
+ id: number;
1249
+ tag: string | null;
1250
+ shortUuid: string;
1251
+ trafficLimitBytes: number;
1252
+ description: string | null;
1253
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
1254
+ expireAt: Date;
1255
+ telegramId: number | null;
1256
+ email: string | null;
1257
+ hwidDeviceLimit: number | null;
1258
+ externalSquadUuid: string | null;
1259
+ trojanPassword: string;
1260
+ vlessUuid: string;
1261
+ ssPassword: string;
1262
+ lastTriggeredThreshold: number;
1263
+ subRevokedAt: Date | null;
1264
+ subLastUserAgent: string | null;
1265
+ subLastOpenedAt: Date | null;
1266
+ lastTrafficResetAt: Date | null;
1267
+ subscriptionUrl: string;
1268
+ activeInternalSquads: {
1269
+ uuid: string;
1270
+ name: string;
1271
+ }[];
1272
+ userTraffic: {
1273
+ usedTrafficBytes: number;
1274
+ lifetimeUsedTrafficBytes: number;
1275
+ onlineAt: Date | null;
1276
+ firstConnectedAt: Date | null;
1277
+ lastConnectedNodeUuid: string | null;
1278
+ };
1279
+ };
1280
+ scope: "user";
1281
+ event: "user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected";
1282
+ timestamp: Date;
1283
+ meta: {
1284
+ notConnectedAfterHours?: number | null | undefined;
1285
+ } | null;
1286
+ }, {
1287
+ data: {
1288
+ uuid: string;
1289
+ createdAt: string;
1290
+ updatedAt: string;
1291
+ username: string;
1292
+ id: number;
1293
+ tag: string | null;
1294
+ shortUuid: string;
1295
+ description: string | null;
1296
+ expireAt: string;
1297
+ telegramId: number | null;
1298
+ email: string | null;
1299
+ hwidDeviceLimit: number | null;
1300
+ externalSquadUuid: string | null;
1301
+ trojanPassword: string;
1302
+ vlessUuid: string;
1303
+ ssPassword: string;
1304
+ subRevokedAt: string | null;
1305
+ subLastUserAgent: string | null;
1306
+ subLastOpenedAt: string | null;
1307
+ lastTrafficResetAt: string | null;
1308
+ subscriptionUrl: string;
1309
+ activeInternalSquads: {
1310
+ uuid: string;
1311
+ name: string;
1312
+ }[];
1313
+ userTraffic: {
1314
+ usedTrafficBytes: number;
1315
+ lifetimeUsedTrafficBytes: number;
1316
+ onlineAt: string | null;
1317
+ firstConnectedAt: string | null;
1318
+ lastConnectedNodeUuid: string | null;
1319
+ };
1320
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
1321
+ trafficLimitBytes?: number | undefined;
1322
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
1323
+ lastTriggeredThreshold?: number | undefined;
1324
+ };
1325
+ scope: "user";
1326
+ event: "user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected";
1327
+ timestamp: string;
1328
+ meta: {
1329
+ notConnectedAfterHours?: number | null | undefined;
1330
+ } | null;
1331
+ }>, z.ZodObject<{
1332
+ scope: z.ZodLiteral<"user_hwid_devices">;
1333
+ event: z.ZodEnum<["user_hwid_devices.added", ...("user_hwid_devices.added" | "user_hwid_devices.deleted")[]]>;
1334
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
1335
+ data: z.ZodObject<{
1336
+ user: z.ZodObject<{
1337
+ uuid: z.ZodString;
1338
+ id: z.ZodNumber;
1339
+ shortUuid: z.ZodString;
1340
+ username: z.ZodString;
1341
+ status: z.ZodDefault<z.ZodNativeEnum<{
1342
+ readonly ACTIVE: "ACTIVE";
1343
+ readonly DISABLED: "DISABLED";
1344
+ readonly LIMITED: "LIMITED";
1345
+ readonly EXPIRED: "EXPIRED";
1346
+ }>>;
1347
+ trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
1348
+ trafficLimitStrategy: z.ZodDefault<z.ZodNativeEnum<{
1349
+ readonly NO_RESET: "NO_RESET";
1350
+ readonly DAY: "DAY";
1351
+ readonly WEEK: "WEEK";
1352
+ readonly MONTH: "MONTH";
1353
+ }>>;
1354
+ expireAt: z.ZodEffects<z.ZodString, Date, string>;
1355
+ telegramId: z.ZodNullable<z.ZodNumber>;
1356
+ email: z.ZodNullable<z.ZodString>;
1357
+ description: z.ZodNullable<z.ZodString>;
1358
+ tag: z.ZodNullable<z.ZodString>;
1359
+ hwidDeviceLimit: z.ZodNullable<z.ZodNumber>;
1360
+ externalSquadUuid: z.ZodNullable<z.ZodString>;
1361
+ trojanPassword: z.ZodString;
1362
+ vlessUuid: z.ZodString;
1363
+ ssPassword: z.ZodString;
1364
+ lastTriggeredThreshold: z.ZodDefault<z.ZodNumber>;
1365
+ subRevokedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1366
+ subLastUserAgent: z.ZodNullable<z.ZodString>;
1367
+ subLastOpenedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1368
+ lastTrafficResetAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1369
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
1370
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
1371
+ } & {
1372
+ subscriptionUrl: z.ZodString;
1373
+ activeInternalSquads: z.ZodArray<z.ZodObject<{
1374
+ uuid: z.ZodString;
1375
+ name: z.ZodString;
1376
+ }, "strip", z.ZodTypeAny, {
1377
+ uuid: string;
1378
+ name: string;
1379
+ }, {
1380
+ uuid: string;
1381
+ name: string;
1382
+ }>, "many">;
1383
+ userTraffic: z.ZodObject<{
1384
+ usedTrafficBytes: z.ZodNumber;
1385
+ lifetimeUsedTrafficBytes: z.ZodNumber;
1386
+ onlineAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1387
+ firstConnectedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1388
+ lastConnectedNodeUuid: z.ZodNullable<z.ZodString>;
1389
+ }, "strip", z.ZodTypeAny, {
1390
+ usedTrafficBytes: number;
1391
+ lifetimeUsedTrafficBytes: number;
1392
+ onlineAt: Date | null;
1393
+ firstConnectedAt: Date | null;
1394
+ lastConnectedNodeUuid: string | null;
1395
+ }, {
1396
+ usedTrafficBytes: number;
1397
+ lifetimeUsedTrafficBytes: number;
1398
+ onlineAt: string | null;
1399
+ firstConnectedAt: string | null;
1400
+ lastConnectedNodeUuid: string | null;
1401
+ }>;
1402
+ }, "strip", z.ZodTypeAny, {
1403
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
1404
+ uuid: string;
1405
+ createdAt: Date;
1406
+ updatedAt: Date;
1407
+ username: string;
1408
+ id: number;
1409
+ tag: string | null;
1410
+ shortUuid: string;
1411
+ trafficLimitBytes: number;
1412
+ description: string | null;
1413
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
1414
+ expireAt: Date;
1415
+ telegramId: number | null;
1416
+ email: string | null;
1417
+ hwidDeviceLimit: number | null;
1418
+ externalSquadUuid: string | null;
1419
+ trojanPassword: string;
1420
+ vlessUuid: string;
1421
+ ssPassword: string;
1422
+ lastTriggeredThreshold: number;
1423
+ subRevokedAt: Date | null;
1424
+ subLastUserAgent: string | null;
1425
+ subLastOpenedAt: Date | null;
1426
+ lastTrafficResetAt: Date | null;
1427
+ subscriptionUrl: string;
1428
+ activeInternalSquads: {
1429
+ uuid: string;
1430
+ name: string;
1431
+ }[];
1432
+ userTraffic: {
1433
+ usedTrafficBytes: number;
1434
+ lifetimeUsedTrafficBytes: number;
1435
+ onlineAt: Date | null;
1436
+ firstConnectedAt: Date | null;
1437
+ lastConnectedNodeUuid: string | null;
1438
+ };
1439
+ }, {
1440
+ uuid: string;
1441
+ createdAt: string;
1442
+ updatedAt: string;
1443
+ username: string;
1444
+ id: number;
1445
+ tag: string | null;
1446
+ shortUuid: string;
1447
+ description: string | null;
1448
+ expireAt: string;
1449
+ telegramId: number | null;
1450
+ email: string | null;
1451
+ hwidDeviceLimit: number | null;
1452
+ externalSquadUuid: string | null;
1453
+ trojanPassword: string;
1454
+ vlessUuid: string;
1455
+ ssPassword: string;
1456
+ subRevokedAt: string | null;
1457
+ subLastUserAgent: string | null;
1458
+ subLastOpenedAt: string | null;
1459
+ lastTrafficResetAt: string | null;
1460
+ subscriptionUrl: string;
1461
+ activeInternalSquads: {
1462
+ uuid: string;
1463
+ name: string;
1464
+ }[];
1465
+ userTraffic: {
1466
+ usedTrafficBytes: number;
1467
+ lifetimeUsedTrafficBytes: number;
1468
+ onlineAt: string | null;
1469
+ firstConnectedAt: string | null;
1470
+ lastConnectedNodeUuid: string | null;
1471
+ };
1472
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
1473
+ trafficLimitBytes?: number | undefined;
1474
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
1475
+ lastTriggeredThreshold?: number | undefined;
1476
+ }>;
1477
+ hwidUserDevice: z.ZodObject<{
1478
+ hwid: z.ZodString;
1479
+ userUuid: z.ZodString;
1480
+ platform: z.ZodNullable<z.ZodString>;
1481
+ osVersion: z.ZodNullable<z.ZodString>;
1482
+ deviceModel: z.ZodNullable<z.ZodString>;
1483
+ userAgent: z.ZodNullable<z.ZodString>;
1484
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
1485
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
1486
+ }, "strip", z.ZodTypeAny, {
1487
+ hwid: string;
1488
+ createdAt: Date;
1489
+ updatedAt: Date;
1490
+ userUuid: string;
1491
+ platform: string | null;
1492
+ osVersion: string | null;
1493
+ deviceModel: string | null;
1494
+ userAgent: string | null;
1495
+ }, {
1496
+ hwid: string;
1497
+ createdAt: string;
1498
+ updatedAt: string;
1499
+ userUuid: string;
1500
+ platform: string | null;
1501
+ osVersion: string | null;
1502
+ deviceModel: string | null;
1503
+ userAgent: string | null;
1504
+ }>;
1505
+ }, "strip", z.ZodTypeAny, {
1506
+ user: {
1507
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
1508
+ uuid: string;
1509
+ createdAt: Date;
1510
+ updatedAt: Date;
1511
+ username: string;
1512
+ id: number;
1513
+ tag: string | null;
1514
+ shortUuid: string;
1515
+ trafficLimitBytes: number;
1516
+ description: string | null;
1517
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
1518
+ expireAt: Date;
1519
+ telegramId: number | null;
1520
+ email: string | null;
1521
+ hwidDeviceLimit: number | null;
1522
+ externalSquadUuid: string | null;
1523
+ trojanPassword: string;
1524
+ vlessUuid: string;
1525
+ ssPassword: string;
1526
+ lastTriggeredThreshold: number;
1527
+ subRevokedAt: Date | null;
1528
+ subLastUserAgent: string | null;
1529
+ subLastOpenedAt: Date | null;
1530
+ lastTrafficResetAt: Date | null;
1531
+ subscriptionUrl: string;
1532
+ activeInternalSquads: {
1533
+ uuid: string;
1534
+ name: string;
1535
+ }[];
1536
+ userTraffic: {
1537
+ usedTrafficBytes: number;
1538
+ lifetimeUsedTrafficBytes: number;
1539
+ onlineAt: Date | null;
1540
+ firstConnectedAt: Date | null;
1541
+ lastConnectedNodeUuid: string | null;
1542
+ };
1543
+ };
1544
+ hwidUserDevice: {
1545
+ hwid: string;
1546
+ createdAt: Date;
1547
+ updatedAt: Date;
1548
+ userUuid: string;
1549
+ platform: string | null;
1550
+ osVersion: string | null;
1551
+ deviceModel: string | null;
1552
+ userAgent: string | null;
1553
+ };
1554
+ }, {
1555
+ user: {
1556
+ uuid: string;
1557
+ createdAt: string;
1558
+ updatedAt: string;
1559
+ username: string;
1560
+ id: number;
1561
+ tag: string | null;
1562
+ shortUuid: string;
1563
+ description: string | null;
1564
+ expireAt: string;
1565
+ telegramId: number | null;
1566
+ email: string | null;
1567
+ hwidDeviceLimit: number | null;
1568
+ externalSquadUuid: string | null;
1569
+ trojanPassword: string;
1570
+ vlessUuid: string;
1571
+ ssPassword: string;
1572
+ subRevokedAt: string | null;
1573
+ subLastUserAgent: string | null;
1574
+ subLastOpenedAt: string | null;
1575
+ lastTrafficResetAt: string | null;
1576
+ subscriptionUrl: string;
1577
+ activeInternalSquads: {
1578
+ uuid: string;
1579
+ name: string;
1580
+ }[];
1581
+ userTraffic: {
1582
+ usedTrafficBytes: number;
1583
+ lifetimeUsedTrafficBytes: number;
1584
+ onlineAt: string | null;
1585
+ firstConnectedAt: string | null;
1586
+ lastConnectedNodeUuid: string | null;
1587
+ };
1588
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
1589
+ trafficLimitBytes?: number | undefined;
1590
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
1591
+ lastTriggeredThreshold?: number | undefined;
1592
+ };
1593
+ hwidUserDevice: {
1594
+ hwid: string;
1595
+ createdAt: string;
1596
+ updatedAt: string;
1597
+ userUuid: string;
1598
+ platform: string | null;
1599
+ osVersion: string | null;
1600
+ deviceModel: string | null;
1601
+ userAgent: string | null;
1602
+ };
1603
+ }>;
1604
+ }, "strip", z.ZodTypeAny, {
1605
+ data: {
1606
+ user: {
1607
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
1608
+ uuid: string;
1609
+ createdAt: Date;
1610
+ updatedAt: Date;
1611
+ username: string;
1612
+ id: number;
1613
+ tag: string | null;
1614
+ shortUuid: string;
1615
+ trafficLimitBytes: number;
1616
+ description: string | null;
1617
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
1618
+ expireAt: Date;
1619
+ telegramId: number | null;
1620
+ email: string | null;
1621
+ hwidDeviceLimit: number | null;
1622
+ externalSquadUuid: string | null;
1623
+ trojanPassword: string;
1624
+ vlessUuid: string;
1625
+ ssPassword: string;
1626
+ lastTriggeredThreshold: number;
1627
+ subRevokedAt: Date | null;
1628
+ subLastUserAgent: string | null;
1629
+ subLastOpenedAt: Date | null;
1630
+ lastTrafficResetAt: Date | null;
1631
+ subscriptionUrl: string;
1632
+ activeInternalSquads: {
1633
+ uuid: string;
1634
+ name: string;
1635
+ }[];
1636
+ userTraffic: {
1637
+ usedTrafficBytes: number;
1638
+ lifetimeUsedTrafficBytes: number;
1639
+ onlineAt: Date | null;
1640
+ firstConnectedAt: Date | null;
1641
+ lastConnectedNodeUuid: string | null;
1642
+ };
1643
+ };
1644
+ hwidUserDevice: {
1645
+ hwid: string;
1646
+ createdAt: Date;
1647
+ updatedAt: Date;
1648
+ userUuid: string;
1649
+ platform: string | null;
1650
+ osVersion: string | null;
1651
+ deviceModel: string | null;
1652
+ userAgent: string | null;
1653
+ };
1654
+ };
1655
+ scope: "user_hwid_devices";
1656
+ event: "user_hwid_devices.added" | "user_hwid_devices.deleted";
1657
+ timestamp: Date;
1658
+ }, {
1659
+ data: {
1660
+ user: {
1661
+ uuid: string;
1662
+ createdAt: string;
1663
+ updatedAt: string;
1664
+ username: string;
1665
+ id: number;
1666
+ tag: string | null;
1667
+ shortUuid: string;
1668
+ description: string | null;
1669
+ expireAt: string;
1670
+ telegramId: number | null;
1671
+ email: string | null;
1672
+ hwidDeviceLimit: number | null;
1673
+ externalSquadUuid: string | null;
1674
+ trojanPassword: string;
1675
+ vlessUuid: string;
1676
+ ssPassword: string;
1677
+ subRevokedAt: string | null;
1678
+ subLastUserAgent: string | null;
1679
+ subLastOpenedAt: string | null;
1680
+ lastTrafficResetAt: string | null;
1681
+ subscriptionUrl: string;
1682
+ activeInternalSquads: {
1683
+ uuid: string;
1684
+ name: string;
1685
+ }[];
1686
+ userTraffic: {
1687
+ usedTrafficBytes: number;
1688
+ lifetimeUsedTrafficBytes: number;
1689
+ onlineAt: string | null;
1690
+ firstConnectedAt: string | null;
1691
+ lastConnectedNodeUuid: string | null;
1692
+ };
1693
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
1694
+ trafficLimitBytes?: number | undefined;
1695
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
1696
+ lastTriggeredThreshold?: number | undefined;
1697
+ };
1698
+ hwidUserDevice: {
1699
+ hwid: string;
1700
+ createdAt: string;
1701
+ updatedAt: string;
1702
+ userUuid: string;
1703
+ platform: string | null;
1704
+ osVersion: string | null;
1705
+ deviceModel: string | null;
1706
+ userAgent: string | null;
1707
+ };
1708
+ };
1709
+ scope: "user_hwid_devices";
1710
+ event: "user_hwid_devices.added" | "user_hwid_devices.deleted";
1711
+ timestamp: string;
1712
+ }>, z.ZodObject<{
1713
+ scope: z.ZodLiteral<"node">;
1714
+ event: z.ZodEnum<["node.created", ...("node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify")[]]>;
1715
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
1716
+ data: z.ZodObject<{
1717
+ uuid: z.ZodString;
1718
+ name: z.ZodString;
1719
+ address: z.ZodString;
1720
+ port: z.ZodNullable<z.ZodNumber>;
1721
+ isConnected: z.ZodBoolean;
1722
+ isDisabled: z.ZodBoolean;
1723
+ isConnecting: z.ZodBoolean;
1724
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1725
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
1726
+ xrayVersion: z.ZodNullable<z.ZodString>;
1727
+ nodeVersion: z.ZodNullable<z.ZodString>;
1728
+ xrayUptime: z.ZodString;
1729
+ isTrafficTrackingActive: z.ZodBoolean;
1730
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
1731
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
1732
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
1733
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
1734
+ usersOnline: z.ZodNullable<z.ZodNumber>;
1735
+ viewPosition: z.ZodNumber;
1736
+ countryCode: z.ZodString;
1737
+ consumptionMultiplier: z.ZodNumber;
1738
+ tags: z.ZodArray<z.ZodString, "many">;
1739
+ cpuCount: z.ZodNullable<z.ZodNumber>;
1740
+ cpuModel: z.ZodNullable<z.ZodString>;
1741
+ totalRam: z.ZodNullable<z.ZodString>;
1742
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
1743
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
1744
+ configProfile: z.ZodObject<{
1745
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
1746
+ activeInbounds: z.ZodArray<z.ZodObject<{
1747
+ uuid: z.ZodString;
1748
+ profileUuid: z.ZodString;
1749
+ tag: z.ZodString;
1750
+ type: z.ZodString;
1751
+ network: z.ZodNullable<z.ZodString>;
1752
+ security: z.ZodNullable<z.ZodString>;
1753
+ port: z.ZodNullable<z.ZodNumber>;
1754
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
1755
+ }, "strip", z.ZodTypeAny, {
1756
+ type: string;
1757
+ uuid: string;
1758
+ profileUuid: string;
1759
+ tag: string;
1760
+ network: string | null;
1761
+ security: string | null;
1762
+ port: number | null;
1763
+ rawInbound?: unknown;
1764
+ }, {
1765
+ type: string;
1766
+ uuid: string;
1767
+ profileUuid: string;
1768
+ tag: string;
1769
+ network: string | null;
1770
+ security: string | null;
1771
+ port: number | null;
1772
+ rawInbound?: unknown;
1773
+ }>, "many">;
1774
+ }, "strip", z.ZodTypeAny, {
1775
+ activeConfigProfileUuid: string | null;
1776
+ activeInbounds: {
1777
+ type: string;
1778
+ uuid: string;
1779
+ profileUuid: string;
1780
+ tag: string;
1781
+ network: string | null;
1782
+ security: string | null;
1783
+ port: number | null;
1784
+ rawInbound?: unknown;
1785
+ }[];
1786
+ }, {
1787
+ activeConfigProfileUuid: string | null;
1788
+ activeInbounds: {
1789
+ type: string;
1790
+ uuid: string;
1791
+ profileUuid: string;
1792
+ tag: string;
1793
+ network: string | null;
1794
+ security: string | null;
1795
+ port: number | null;
1796
+ rawInbound?: unknown;
1797
+ }[];
1798
+ }>;
1799
+ providerUuid: z.ZodNullable<z.ZodString>;
1800
+ provider: z.ZodNullable<z.ZodObject<{
1801
+ uuid: z.ZodString;
1802
+ name: z.ZodString;
1803
+ faviconLink: z.ZodNullable<z.ZodString>;
1804
+ loginUrl: z.ZodNullable<z.ZodString>;
1805
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
1806
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
1807
+ }, "strip", z.ZodTypeAny, {
1808
+ uuid: string;
1809
+ createdAt: Date;
1810
+ updatedAt: Date;
1811
+ name: string;
1812
+ faviconLink: string | null;
1813
+ loginUrl: string | null;
1814
+ }, {
1815
+ uuid: string;
1816
+ createdAt: string;
1817
+ updatedAt: string;
1818
+ name: string;
1819
+ faviconLink: string | null;
1820
+ loginUrl: string | null;
1821
+ }>>;
1822
+ }, "strip", z.ZodTypeAny, {
1823
+ tags: string[];
1824
+ uuid: string;
1825
+ createdAt: Date;
1826
+ updatedAt: Date;
1827
+ provider: {
1828
+ uuid: string;
1829
+ createdAt: Date;
1830
+ updatedAt: Date;
1831
+ name: string;
1832
+ faviconLink: string | null;
1833
+ loginUrl: string | null;
1834
+ } | null;
1835
+ countryCode: string;
1836
+ name: string;
1837
+ port: number | null;
1838
+ viewPosition: number;
1839
+ trafficLimitBytes: number | null;
1840
+ address: string;
1841
+ isDisabled: boolean;
1842
+ isConnected: boolean;
1843
+ isConnecting: boolean;
1844
+ lastStatusChange: Date | null;
1845
+ lastStatusMessage: string | null;
1846
+ xrayVersion: string | null;
1847
+ nodeVersion: string | null;
1848
+ xrayUptime: string;
1849
+ isTrafficTrackingActive: boolean;
1850
+ trafficResetDay: number | null;
1851
+ trafficUsedBytes: number | null;
1852
+ notifyPercent: number | null;
1853
+ usersOnline: number | null;
1854
+ consumptionMultiplier: number;
1855
+ cpuCount: number | null;
1856
+ cpuModel: string | null;
1857
+ totalRam: string | null;
1858
+ configProfile: {
1859
+ activeConfigProfileUuid: string | null;
1860
+ activeInbounds: {
1861
+ type: string;
1862
+ uuid: string;
1863
+ profileUuid: string;
1864
+ tag: string;
1865
+ network: string | null;
1866
+ security: string | null;
1867
+ port: number | null;
1868
+ rawInbound?: unknown;
1869
+ }[];
1870
+ };
1871
+ providerUuid: string | null;
1872
+ }, {
1873
+ tags: string[];
1874
+ uuid: string;
1875
+ createdAt: string;
1876
+ updatedAt: string;
1877
+ provider: {
1878
+ uuid: string;
1879
+ createdAt: string;
1880
+ updatedAt: string;
1881
+ name: string;
1882
+ faviconLink: string | null;
1883
+ loginUrl: string | null;
1884
+ } | null;
1885
+ countryCode: string;
1886
+ name: string;
1887
+ port: number | null;
1888
+ viewPosition: number;
1889
+ trafficLimitBytes: number | null;
1890
+ address: string;
1891
+ isDisabled: boolean;
1892
+ isConnected: boolean;
1893
+ isConnecting: boolean;
1894
+ lastStatusChange: string | null;
1895
+ lastStatusMessage: string | null;
1896
+ xrayVersion: string | null;
1897
+ nodeVersion: string | null;
1898
+ xrayUptime: string;
1899
+ isTrafficTrackingActive: boolean;
1900
+ trafficResetDay: number | null;
1901
+ trafficUsedBytes: number | null;
1902
+ notifyPercent: number | null;
1903
+ usersOnline: number | null;
1904
+ consumptionMultiplier: number;
1905
+ cpuCount: number | null;
1906
+ cpuModel: string | null;
1907
+ totalRam: string | null;
1908
+ configProfile: {
1909
+ activeConfigProfileUuid: string | null;
1910
+ activeInbounds: {
1911
+ type: string;
1912
+ uuid: string;
1913
+ profileUuid: string;
1914
+ tag: string;
1915
+ network: string | null;
1916
+ security: string | null;
1917
+ port: number | null;
1918
+ rawInbound?: unknown;
1919
+ }[];
1920
+ };
1921
+ providerUuid: string | null;
1922
+ }>;
1923
+ }, "strip", z.ZodTypeAny, {
1924
+ data: {
1925
+ tags: string[];
1926
+ uuid: string;
1927
+ createdAt: Date;
1928
+ updatedAt: Date;
1929
+ provider: {
1930
+ uuid: string;
1931
+ createdAt: Date;
1932
+ updatedAt: Date;
1933
+ name: string;
1934
+ faviconLink: string | null;
1935
+ loginUrl: string | null;
1936
+ } | null;
1937
+ countryCode: string;
1938
+ name: string;
1939
+ port: number | null;
1940
+ viewPosition: number;
1941
+ trafficLimitBytes: number | null;
1942
+ address: string;
1943
+ isDisabled: boolean;
1944
+ isConnected: boolean;
1945
+ isConnecting: boolean;
1946
+ lastStatusChange: Date | null;
1947
+ lastStatusMessage: string | null;
1948
+ xrayVersion: string | null;
1949
+ nodeVersion: string | null;
1950
+ xrayUptime: string;
1951
+ isTrafficTrackingActive: boolean;
1952
+ trafficResetDay: number | null;
1953
+ trafficUsedBytes: number | null;
1954
+ notifyPercent: number | null;
1955
+ usersOnline: number | null;
1956
+ consumptionMultiplier: number;
1957
+ cpuCount: number | null;
1958
+ cpuModel: string | null;
1959
+ totalRam: string | null;
1960
+ configProfile: {
1961
+ activeConfigProfileUuid: string | null;
1962
+ activeInbounds: {
1963
+ type: string;
1964
+ uuid: string;
1965
+ profileUuid: string;
1966
+ tag: string;
1967
+ network: string | null;
1968
+ security: string | null;
1969
+ port: number | null;
1970
+ rawInbound?: unknown;
1971
+ }[];
1972
+ };
1973
+ providerUuid: string | null;
1974
+ };
1975
+ scope: "node";
1976
+ event: "node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify";
1977
+ timestamp: Date;
1978
+ }, {
1979
+ data: {
1980
+ tags: string[];
1981
+ uuid: string;
1982
+ createdAt: string;
1983
+ updatedAt: string;
1984
+ provider: {
1985
+ uuid: string;
1986
+ createdAt: string;
1987
+ updatedAt: string;
1988
+ name: string;
1989
+ faviconLink: string | null;
1990
+ loginUrl: string | null;
1991
+ } | null;
1992
+ countryCode: string;
1993
+ name: string;
1994
+ port: number | null;
1995
+ viewPosition: number;
1996
+ trafficLimitBytes: number | null;
1997
+ address: string;
1998
+ isDisabled: boolean;
1999
+ isConnected: boolean;
2000
+ isConnecting: boolean;
2001
+ lastStatusChange: string | null;
2002
+ lastStatusMessage: string | null;
2003
+ xrayVersion: string | null;
2004
+ nodeVersion: string | null;
2005
+ xrayUptime: string;
2006
+ isTrafficTrackingActive: boolean;
2007
+ trafficResetDay: number | null;
2008
+ trafficUsedBytes: number | null;
2009
+ notifyPercent: number | null;
2010
+ usersOnline: number | null;
2011
+ consumptionMultiplier: number;
2012
+ cpuCount: number | null;
2013
+ cpuModel: string | null;
2014
+ totalRam: string | null;
2015
+ configProfile: {
2016
+ activeConfigProfileUuid: string | null;
2017
+ activeInbounds: {
2018
+ type: string;
2019
+ uuid: string;
2020
+ profileUuid: string;
2021
+ tag: string;
2022
+ network: string | null;
2023
+ security: string | null;
2024
+ port: number | null;
2025
+ rawInbound?: unknown;
2026
+ }[];
2027
+ };
2028
+ providerUuid: string | null;
2029
+ };
2030
+ scope: "node";
2031
+ event: "node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify";
2032
+ timestamp: string;
2033
+ }>, z.ZodObject<{
2034
+ scope: z.ZodLiteral<"service">;
2035
+ event: z.ZodEnum<["service.panel_started", ...("service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success")[]]>;
2036
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
2037
+ data: z.ZodObject<{
2038
+ loginAttempt: z.ZodOptional<z.ZodObject<{
2039
+ username: z.ZodString;
2040
+ ip: z.ZodString;
2041
+ userAgent: z.ZodString;
2042
+ description: z.ZodOptional<z.ZodString>;
2043
+ password: z.ZodOptional<z.ZodString>;
2044
+ }, "strip", z.ZodTypeAny, {
2045
+ username: string;
2046
+ ip: string;
2047
+ userAgent: string;
2048
+ password?: string | undefined;
2049
+ description?: string | undefined;
2050
+ }, {
2051
+ username: string;
2052
+ ip: string;
2053
+ userAgent: string;
2054
+ password?: string | undefined;
2055
+ description?: string | undefined;
2056
+ }>>;
2057
+ panelVersion: z.ZodOptional<z.ZodString>;
2058
+ }, "strip", z.ZodTypeAny, {
2059
+ loginAttempt?: {
2060
+ username: string;
2061
+ ip: string;
2062
+ userAgent: string;
2063
+ password?: string | undefined;
2064
+ description?: string | undefined;
2065
+ } | undefined;
2066
+ panelVersion?: string | undefined;
2067
+ }, {
2068
+ loginAttempt?: {
2069
+ username: string;
2070
+ ip: string;
2071
+ userAgent: string;
2072
+ password?: string | undefined;
2073
+ description?: string | undefined;
2074
+ } | undefined;
2075
+ panelVersion?: string | undefined;
2076
+ }>;
2077
+ }, "strip", z.ZodTypeAny, {
2078
+ data: {
2079
+ loginAttempt?: {
2080
+ username: string;
2081
+ ip: string;
2082
+ userAgent: string;
2083
+ password?: string | undefined;
2084
+ description?: string | undefined;
2085
+ } | undefined;
2086
+ panelVersion?: string | undefined;
2087
+ };
2088
+ scope: "service";
2089
+ event: "service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success";
2090
+ timestamp: Date;
2091
+ }, {
2092
+ data: {
2093
+ loginAttempt?: {
2094
+ username: string;
2095
+ ip: string;
2096
+ userAgent: string;
2097
+ password?: string | undefined;
2098
+ description?: string | undefined;
2099
+ } | undefined;
2100
+ panelVersion?: string | undefined;
2101
+ };
2102
+ scope: "service";
2103
+ event: "service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success";
2104
+ timestamp: string;
2105
+ }>, z.ZodObject<{
2106
+ scope: z.ZodLiteral<"errors">;
2107
+ event: z.ZodEnum<["errors.bandwidth_usage_threshold_reached_max_notifications", ..."errors.bandwidth_usage_threshold_reached_max_notifications"[]]>;
2108
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
2109
+ data: z.ZodObject<{
2110
+ description: z.ZodString;
2111
+ }, "strip", z.ZodTypeAny, {
2112
+ description: string;
2113
+ }, {
2114
+ description: string;
2115
+ }>;
2116
+ }, "strip", z.ZodTypeAny, {
2117
+ data: {
2118
+ description: string;
2119
+ };
2120
+ scope: "errors";
2121
+ event: "errors.bandwidth_usage_threshold_reached_max_notifications";
2122
+ timestamp: Date;
2123
+ }, {
2124
+ data: {
2125
+ description: string;
2126
+ };
2127
+ scope: "errors";
2128
+ event: "errors.bandwidth_usage_threshold_reached_max_notifications";
2129
+ timestamp: string;
2130
+ }>, z.ZodObject<{
2131
+ scope: z.ZodLiteral<"crm">;
2132
+ event: z.ZodEnum<["crm.infra_billing_node_payment_in_7_days", ...("crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days")[]]>;
2133
+ timestamp: z.ZodEffects<z.ZodString, Date, string>;
2134
+ data: z.ZodObject<{
2135
+ providerName: z.ZodString;
2136
+ nodeName: z.ZodString;
2137
+ nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
2138
+ loginUrl: z.ZodString;
2139
+ }, "strip", z.ZodTypeAny, {
2140
+ nodeName: string;
2141
+ loginUrl: string;
2142
+ nextBillingAt: Date;
2143
+ providerName: string;
2144
+ }, {
2145
+ nodeName: string;
2146
+ loginUrl: string;
2147
+ nextBillingAt: string;
2148
+ providerName: string;
2149
+ }>;
2150
+ }, "strip", z.ZodTypeAny, {
2151
+ data: {
2152
+ nodeName: string;
2153
+ loginUrl: string;
2154
+ nextBillingAt: Date;
2155
+ providerName: string;
2156
+ };
2157
+ scope: "crm";
2158
+ event: "crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days";
2159
+ timestamp: Date;
2160
+ }, {
2161
+ data: {
2162
+ nodeName: string;
2163
+ loginUrl: string;
2164
+ nextBillingAt: string;
2165
+ providerName: string;
2166
+ };
2167
+ scope: "crm";
2168
+ event: "crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days";
2169
+ timestamp: string;
2170
+ }>]>;
2171
+ export type TRemnawaveWebhookEvent = z.infer<typeof RemnawaveWebhookEventSchema>;
2172
+ export type TRemnawaveWebhookUserEvent = z.infer<typeof RemnawaveWebhookUserEvents>;
2173
+ export type TRemnawaveWebhookNodeEvent = z.infer<typeof RemnawaveWebhookNodeEvents>;
2174
+ export type TRemnawaveWebhookServiceEvent = z.infer<typeof RemnawaveWebhookServiceEvents>;
2175
+ export type TRemnawaveWebhookErrorsEvent = z.infer<typeof RemnawaveWebhookErrorsEvents>;
2176
+ export type TRemnawaveWebhookCrmEvent = z.infer<typeof RemnawaveWebhookCrmEvents>;
2177
+ export type TRemnawaveWebhookUserHwidDevicesEvent = z.infer<typeof RemnawaveWebhookUserHwidDevicesEvents>;
2178
+ //# sourceMappingURL=webhook.schema.d.ts.map