@remnawave/backend-contract 2.3.34 → 2.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/backend/api/controllers/hwid.d.ts +1 -0
- package/build/backend/api/controllers/hwid.d.ts.map +1 -1
- package/build/backend/api/controllers/hwid.js +1 -0
- package/build/backend/api/routes.d.ts +1 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +1 -0
- package/build/backend/commands/hwid/get-top-users-by-hwid-devices.command.d.ts +104 -0
- package/build/backend/commands/hwid/get-top-users-by-hwid-devices.command.d.ts.map +1 -0
- package/build/backend/commands/hwid/get-top-users-by-hwid-devices.command.js +28 -0
- package/build/backend/commands/hwid/index.d.ts +1 -0
- package/build/backend/commands/hwid/index.d.ts.map +1 -1
- package/build/backend/commands/hwid/index.js +1 -0
- package/build/backend/constants/events/events.d.ts +4 -2
- package/build/backend/constants/events/events.d.ts.map +1 -1
- package/build/backend/constants/events/events.js +2 -2
- package/build/frontend/api/controllers/hwid.js +1 -0
- package/build/frontend/api/routes.js +1 -0
- package/build/frontend/commands/hwid/get-top-users-by-hwid-devices.command.js +28 -0
- package/build/frontend/commands/hwid/index.js +1 -0
- package/build/frontend/constants/events/events.js +2 -2
- package/package.json +1 -1
|
@@ -6,5 +6,6 @@ export declare const HWID_ROUTES: {
|
|
|
6
6
|
readonly DELETE_USER_HWID_DEVICE: "devices/delete";
|
|
7
7
|
readonly DELETE_ALL_USER_HWID_DEVICES: "devices/delete-all";
|
|
8
8
|
readonly STATS: "devices/stats";
|
|
9
|
+
readonly TOP_USERS_BY_DEVICES: "devices/top-users";
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=hwid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hwid.d.ts","sourceRoot":"","sources":["../../../../api/controllers/hwid.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAG,MAAe,CAAC;AAE/C,eAAO,MAAM,WAAW;;;+CAGc,MAAM
|
|
1
|
+
{"version":3,"file":"hwid.d.ts","sourceRoot":"","sources":["../../../../api/controllers/hwid.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAG,MAAe,CAAC;AAE/C,eAAO,MAAM,WAAW;;;+CAGc,MAAM;;;;;CAMlC,CAAC"}
|
|
@@ -164,6 +164,7 @@ export declare const REST_API: {
|
|
|
164
164
|
readonly DELETE_USER_HWID_DEVICE: "/api/hwid/devices/delete";
|
|
165
165
|
readonly DELETE_ALL_USER_HWID_DEVICES: "/api/hwid/devices/delete-all";
|
|
166
166
|
readonly STATS: "/api/hwid/devices/stats";
|
|
167
|
+
readonly TOP_USERS_BY_DEVICES: "/api/hwid/devices/top-users";
|
|
167
168
|
};
|
|
168
169
|
readonly SUBSCRIPTIONS: {
|
|
169
170
|
readonly GET: "/api/subscriptions/";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;gCAyBE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;;;;oCAOF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;2CAKA,MAAM;;;;;;;;iDAaA,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;8BAOzB,MAAM;6CAES,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MA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;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;;;;yCAYP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;;;;;;;;;;;qCAiBjB,MAAM;gCAIX,MAAM;;uCAKC,MAAM;0CAEH,MAAM;;;;;;;;;;CAW7B,CAAC"}
|
|
@@ -201,6 +201,7 @@ exports.REST_API = {
|
|
|
201
201
|
DELETE_USER_HWID_DEVICE: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.DELETE_USER_HWID_DEVICE}`,
|
|
202
202
|
DELETE_ALL_USER_HWID_DEVICES: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.DELETE_ALL_USER_HWID_DEVICES}`,
|
|
203
203
|
STATS: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.STATS}`,
|
|
204
|
+
TOP_USERS_BY_DEVICES: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.TOP_USERS_BY_DEVICES}`,
|
|
204
205
|
},
|
|
205
206
|
SUBSCRIPTIONS: {
|
|
206
207
|
GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET}`,
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace GetTopUsersByHwidDevicesCommand {
|
|
3
|
+
const url: "/api/hwid/devices/top-users";
|
|
4
|
+
const TSQ_url: "/api/hwid/devices/top-users";
|
|
5
|
+
const endpointDetails: import("../..").EndpointDetails;
|
|
6
|
+
const RequestQuerySchema: z.ZodObject<Pick<{
|
|
7
|
+
start: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
size: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
filters: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
value: z.ZodUnknown;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
id: string;
|
|
14
|
+
value?: unknown;
|
|
15
|
+
}, {
|
|
16
|
+
id: string;
|
|
17
|
+
value?: unknown;
|
|
18
|
+
}>, "many">, {
|
|
19
|
+
id: string;
|
|
20
|
+
value?: unknown;
|
|
21
|
+
}[], unknown>>;
|
|
22
|
+
filterModes: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, unknown>>;
|
|
23
|
+
globalFilterMode: z.ZodOptional<z.ZodString>;
|
|
24
|
+
sorting: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
desc: z.ZodBoolean;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
id: string;
|
|
29
|
+
desc: boolean;
|
|
30
|
+
}, {
|
|
31
|
+
id: string;
|
|
32
|
+
desc: boolean;
|
|
33
|
+
}>, "many">, {
|
|
34
|
+
id: string;
|
|
35
|
+
desc: boolean;
|
|
36
|
+
}[], unknown>>;
|
|
37
|
+
}, "start" | "size">, "strip", z.ZodTypeAny, {
|
|
38
|
+
start: number;
|
|
39
|
+
size: number;
|
|
40
|
+
}, {
|
|
41
|
+
start?: number | undefined;
|
|
42
|
+
size?: number | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
45
|
+
const ResponseSchema: z.ZodObject<{
|
|
46
|
+
response: z.ZodObject<{
|
|
47
|
+
users: z.ZodArray<z.ZodObject<{
|
|
48
|
+
userUuid: z.ZodString;
|
|
49
|
+
id: z.ZodNumber;
|
|
50
|
+
username: z.ZodString;
|
|
51
|
+
devicesCount: z.ZodNumber;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
username: string;
|
|
54
|
+
id: number;
|
|
55
|
+
userUuid: string;
|
|
56
|
+
devicesCount: number;
|
|
57
|
+
}, {
|
|
58
|
+
username: string;
|
|
59
|
+
id: number;
|
|
60
|
+
userUuid: string;
|
|
61
|
+
devicesCount: number;
|
|
62
|
+
}>, "many">;
|
|
63
|
+
total: z.ZodNumber;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
users: {
|
|
66
|
+
username: string;
|
|
67
|
+
id: number;
|
|
68
|
+
userUuid: string;
|
|
69
|
+
devicesCount: number;
|
|
70
|
+
}[];
|
|
71
|
+
total: number;
|
|
72
|
+
}, {
|
|
73
|
+
users: {
|
|
74
|
+
username: string;
|
|
75
|
+
id: number;
|
|
76
|
+
userUuid: string;
|
|
77
|
+
devicesCount: number;
|
|
78
|
+
}[];
|
|
79
|
+
total: number;
|
|
80
|
+
}>;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
response: {
|
|
83
|
+
users: {
|
|
84
|
+
username: string;
|
|
85
|
+
id: number;
|
|
86
|
+
userUuid: string;
|
|
87
|
+
devicesCount: number;
|
|
88
|
+
}[];
|
|
89
|
+
total: number;
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
response: {
|
|
93
|
+
users: {
|
|
94
|
+
username: string;
|
|
95
|
+
id: number;
|
|
96
|
+
userUuid: string;
|
|
97
|
+
devicesCount: number;
|
|
98
|
+
}[];
|
|
99
|
+
total: number;
|
|
100
|
+
};
|
|
101
|
+
}>;
|
|
102
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=get-top-users-by-hwid-devices.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-top-users-by-hwid-devices.command.d.ts","sourceRoot":"","sources":["../../../../commands/hwid/get-top-users-by-hwid-devices.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,+BAA+B,CAAC;IACtC,MAAM,GAAG,+BAAqC,CAAC;IAC/C,MAAM,OAAO,+BAAM,CAAC;IAEpB,MAAM,eAAe,iCAI3B,CAAC;IAEK,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAG7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTopUsersByHwidDevicesCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const __1 = require("../..");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const api_1 = require("../../api");
|
|
8
|
+
var GetTopUsersByHwidDevicesCommand;
|
|
9
|
+
(function (GetTopUsersByHwidDevicesCommand) {
|
|
10
|
+
GetTopUsersByHwidDevicesCommand.url = api_1.REST_API.HWID.TOP_USERS_BY_DEVICES;
|
|
11
|
+
GetTopUsersByHwidDevicesCommand.TSQ_url = GetTopUsersByHwidDevicesCommand.url;
|
|
12
|
+
GetTopUsersByHwidDevicesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HWID_ROUTES.TOP_USERS_BY_DEVICES, 'get', 'Get top users by HWID devices');
|
|
13
|
+
GetTopUsersByHwidDevicesCommand.RequestQuerySchema = __1.TanstackQueryRequestQuerySchema.pick({
|
|
14
|
+
start: true,
|
|
15
|
+
size: true,
|
|
16
|
+
});
|
|
17
|
+
GetTopUsersByHwidDevicesCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
response: zod_1.z.object({
|
|
19
|
+
users: zod_1.z.array(zod_1.z.object({
|
|
20
|
+
userUuid: zod_1.z.string().uuid(),
|
|
21
|
+
id: zod_1.z.number(),
|
|
22
|
+
username: zod_1.z.string(),
|
|
23
|
+
devicesCount: zod_1.z.number(),
|
|
24
|
+
})),
|
|
25
|
+
total: zod_1.z.number(),
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
})(GetTopUsersByHwidDevicesCommand || (exports.GetTopUsersByHwidDevicesCommand = GetTopUsersByHwidDevicesCommand = {}));
|
|
@@ -3,5 +3,6 @@ export * from './delete-all-user-hwid-devices.command';
|
|
|
3
3
|
export * from './delete-user-hwid-device.command';
|
|
4
4
|
export * from './get-all-hwid-devices.command';
|
|
5
5
|
export * from './get-hwid-devices-stats.command';
|
|
6
|
+
export * from './get-top-users-by-hwid-devices.command';
|
|
6
7
|
export * from './get-user-hwid-devices.command';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/hwid/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/hwid/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC"}
|
|
@@ -19,4 +19,5 @@ __exportStar(require("./delete-all-user-hwid-devices.command"), exports);
|
|
|
19
19
|
__exportStar(require("./delete-user-hwid-device.command"), exports);
|
|
20
20
|
__exportStar(require("./get-all-hwid-devices.command"), exports);
|
|
21
21
|
__exportStar(require("./get-hwid-devices-stats.command"), exports);
|
|
22
|
+
__exportStar(require("./get-top-users-by-hwid-devices.command"), exports);
|
|
22
23
|
__exportStar(require("./get-user-hwid-devices.command"), exports);
|
|
@@ -24,10 +24,10 @@ export declare const EVENTS: {
|
|
|
24
24
|
readonly NOT_CONNECTED: "user.not_connected";
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
|
-
* HWID events are emitted only when HWID Device Limit feature is enabled
|
|
27
|
+
* HWID events are emitted only when HWID Device Limit feature is enabled.
|
|
28
28
|
* Event payload contains user and HWID device entities.
|
|
29
29
|
* Note: Telegram notifications are skipped for this event.
|
|
30
|
-
* Note: For performance reasons, user entity's activeInternalSquads
|
|
30
|
+
* Note: For performance reasons, user entity's activeInternalSquads field is always empty.
|
|
31
31
|
* Returns: user and HWID device entities.
|
|
32
32
|
*/
|
|
33
33
|
readonly USER_HWID_DEVICES: {
|
|
@@ -74,4 +74,6 @@ export type TServiceEvents = (typeof EVENTS.SERVICE)[keyof typeof EVENTS.SERVICE
|
|
|
74
74
|
export type TErrorsEvents = (typeof EVENTS.ERRORS)[keyof typeof EVENTS.ERRORS];
|
|
75
75
|
export type TCRMEvents = (typeof EVENTS.CRM)[keyof typeof EVENTS.CRM];
|
|
76
76
|
export type TUserHwidDevicesEvents = (typeof EVENTS.USER_HWID_DEVICES)[keyof typeof EVENTS.USER_HWID_DEVICES];
|
|
77
|
+
export type TAllEvents = TUserEvents | TNodeEvents | TServiceEvents | TErrorsEvents | TCRMEvents | TUserHwidDevicesEvents;
|
|
78
|
+
export type TAllEventChannels = 'telegram' | 'webhook';
|
|
77
79
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../constants/events/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM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OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AAClF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACtE,MAAM,MAAM,sBAAsB,GAC9B,CAAC,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAE7E,MAAM,MAAM,UAAU,GAChB,WAAW,GACX,WAAW,GACX,cAAc,GACd,aAAa,GACb,UAAU,GACV,sBAAsB,CAAC;AAC7B,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,SAAS,CAAC"}
|
|
@@ -27,10 +27,10 @@ exports.EVENTS = {
|
|
|
27
27
|
NOT_CONNECTED: 'user.not_connected',
|
|
28
28
|
},
|
|
29
29
|
/**
|
|
30
|
-
* HWID events are emitted only when HWID Device Limit feature is enabled
|
|
30
|
+
* HWID events are emitted only when HWID Device Limit feature is enabled.
|
|
31
31
|
* Event payload contains user and HWID device entities.
|
|
32
32
|
* Note: Telegram notifications are skipped for this event.
|
|
33
|
-
* Note: For performance reasons, user entity's activeInternalSquads
|
|
33
|
+
* Note: For performance reasons, user entity's activeInternalSquads field is always empty.
|
|
34
34
|
* Returns: user and HWID device entities.
|
|
35
35
|
*/
|
|
36
36
|
USER_HWID_DEVICES: {
|
|
@@ -201,6 +201,7 @@ exports.REST_API = {
|
|
|
201
201
|
DELETE_USER_HWID_DEVICE: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.DELETE_USER_HWID_DEVICE}`,
|
|
202
202
|
DELETE_ALL_USER_HWID_DEVICES: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.DELETE_ALL_USER_HWID_DEVICES}`,
|
|
203
203
|
STATS: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.STATS}`,
|
|
204
|
+
TOP_USERS_BY_DEVICES: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.TOP_USERS_BY_DEVICES}`,
|
|
204
205
|
},
|
|
205
206
|
SUBSCRIPTIONS: {
|
|
206
207
|
GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET}`,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTopUsersByHwidDevicesCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const __1 = require("../..");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const api_1 = require("../../api");
|
|
8
|
+
var GetTopUsersByHwidDevicesCommand;
|
|
9
|
+
(function (GetTopUsersByHwidDevicesCommand) {
|
|
10
|
+
GetTopUsersByHwidDevicesCommand.url = api_1.REST_API.HWID.TOP_USERS_BY_DEVICES;
|
|
11
|
+
GetTopUsersByHwidDevicesCommand.TSQ_url = GetTopUsersByHwidDevicesCommand.url;
|
|
12
|
+
GetTopUsersByHwidDevicesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HWID_ROUTES.TOP_USERS_BY_DEVICES, 'get', 'Get top users by HWID devices');
|
|
13
|
+
GetTopUsersByHwidDevicesCommand.RequestQuerySchema = __1.TanstackQueryRequestQuerySchema.pick({
|
|
14
|
+
start: true,
|
|
15
|
+
size: true,
|
|
16
|
+
});
|
|
17
|
+
GetTopUsersByHwidDevicesCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
response: zod_1.z.object({
|
|
19
|
+
users: zod_1.z.array(zod_1.z.object({
|
|
20
|
+
userUuid: zod_1.z.string().uuid(),
|
|
21
|
+
id: zod_1.z.number(),
|
|
22
|
+
username: zod_1.z.string(),
|
|
23
|
+
devicesCount: zod_1.z.number(),
|
|
24
|
+
})),
|
|
25
|
+
total: zod_1.z.number(),
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
})(GetTopUsersByHwidDevicesCommand || (exports.GetTopUsersByHwidDevicesCommand = GetTopUsersByHwidDevicesCommand = {}));
|
|
@@ -19,4 +19,5 @@ __exportStar(require("./delete-all-user-hwid-devices.command"), exports);
|
|
|
19
19
|
__exportStar(require("./delete-user-hwid-device.command"), exports);
|
|
20
20
|
__exportStar(require("./get-all-hwid-devices.command"), exports);
|
|
21
21
|
__exportStar(require("./get-hwid-devices-stats.command"), exports);
|
|
22
|
+
__exportStar(require("./get-top-users-by-hwid-devices.command"), exports);
|
|
22
23
|
__exportStar(require("./get-user-hwid-devices.command"), exports);
|
|
@@ -27,10 +27,10 @@ exports.EVENTS = {
|
|
|
27
27
|
NOT_CONNECTED: 'user.not_connected',
|
|
28
28
|
},
|
|
29
29
|
/**
|
|
30
|
-
* HWID events are emitted only when HWID Device Limit feature is enabled
|
|
30
|
+
* HWID events are emitted only when HWID Device Limit feature is enabled.
|
|
31
31
|
* Event payload contains user and HWID device entities.
|
|
32
32
|
* Note: Telegram notifications are skipped for this event.
|
|
33
|
-
* Note: For performance reasons, user entity's activeInternalSquads
|
|
33
|
+
* Note: For performance reasons, user entity's activeInternalSquads field is always empty.
|
|
34
34
|
* Returns: user and HWID device entities.
|
|
35
35
|
*/
|
|
36
36
|
USER_HWID_DEVICES: {
|