mirror of
https://github.com/remnawave/node.git
synced 2026-10-21 10:20:51 +00:00
- Updated package version from 0.4.6 to 0.4.7 in package.json and package-lock.json. - Upgraded NestJS dependencies to versions 10.4.15 for common, core, and platform-express. - Enhanced ESLint configuration by adding 'eslint-plugin-paths' and 'eslint-plugin-perfectionist' for improved code quality. - Reorganized export statements in contract library files for better clarity and consistency. - Improved error handling and logging in various modules, including Xray and Stats services. - Refactored command and DTO structures for better maintainability and readability.
26 lines
669 B
TypeScript
26 lines
669 B
TypeScript
import { z } from 'zod';
|
|
|
|
import { REST_API } from '../../api';
|
|
export namespace GetUsersStatsCommand {
|
|
export const url = REST_API.STATS.GET_USERS_STATS;
|
|
|
|
export const RequestSchema = z.object({
|
|
reset: z.boolean(),
|
|
});
|
|
|
|
export type Request = z.infer<typeof RequestSchema>;
|
|
|
|
export const ResponseSchema = z.object({
|
|
response: z.object({
|
|
users: z.array(
|
|
z.object({
|
|
username: z.string(),
|
|
downlink: z.number(),
|
|
uplink: z.number(),
|
|
}),
|
|
),
|
|
}),
|
|
});
|
|
|
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
}
|