@remnawave/backend-contract 0.2.4 → 0.2.6
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/routes.d.ts +1 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +2 -1
- package/build/backend/commands/auth/index.d.ts +1 -1
- package/build/backend/commands/auth/index.d.ts.map +1 -1
- package/build/backend/commands/auth/index.js +1 -1
- package/build/backend/commands/nodes/create.command.js +2 -2
- package/build/backend/commands/users/create-user.command.js +1 -1
- package/build/backend/commands/users/enable-user.command.js +1 -1
- package/build/backend/commands/users/get-all-users-v2.command.js +1 -1
- package/build/backend/commands/users/get-user-by-email.command.js +1 -1
- package/build/backend/commands/users/get-user-by-short-uuid.command.js +1 -1
- package/build/backend/commands/users/get-user-by-subscription-uuid.command.js +1 -1
- package/build/backend/commands/users/get-user-by-telegram-id.command.js +1 -1
- package/build/backend/commands/users/get-user-by-uuid.command.js +1 -1
- package/build/backend/commands/users/index.d.ts +3 -3
- package/build/backend/commands/users/index.d.ts.map +1 -1
- package/build/backend/commands/users/index.js +3 -3
- package/build/backend/commands/users/revoke-user-subscription.command.js +1 -1
- package/build/backend/commands/users/update-user.command.js +1 -1
- package/build/backend/commands/xray/update-config.command.d.ts +1 -1
- package/build/backend/commands/xray/update-config.command.d.ts.map +1 -1
- package/build/backend/commands/xray/update-config.command.js +1 -1
- package/build/backend/constants/errors/errors.d.ts +5 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +5 -0
- package/build/backend/constants/index.d.ts +1 -1
- package/build/backend/constants/index.d.ts.map +1 -1
- package/build/backend/constants/index.js +1 -1
- package/build/backend/models/index.d.ts +1 -1
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -1
- package/build/frontend/api/routes.js +2 -1
- package/build/frontend/commands/auth/index.js +1 -1
- package/build/frontend/commands/nodes/create.command.js +2 -2
- package/build/frontend/commands/users/create-user.command.js +1 -1
- package/build/frontend/commands/users/enable-user.command.js +1 -1
- package/build/frontend/commands/users/get-all-users-v2.command.js +1 -1
- package/build/frontend/commands/users/get-user-by-email.command.js +1 -1
- package/build/frontend/commands/users/get-user-by-short-uuid.command.js +1 -1
- package/build/frontend/commands/users/get-user-by-subscription-uuid.command.js +1 -1
- package/build/frontend/commands/users/get-user-by-telegram-id.command.js +1 -1
- package/build/frontend/commands/users/get-user-by-uuid.command.js +1 -1
- package/build/frontend/commands/users/index.js +3 -3
- package/build/frontend/commands/users/revoke-user-subscription.command.js +1 -1
- package/build/frontend/commands/users/update-user.command.js +1 -1
- package/build/frontend/commands/xray/update-config.command.js +1 -1
- package/build/frontend/constants/errors/errors.js +5 -0
- package/build/frontend/constants/index.js +1 -1
- package/build/frontend/models/index.js +1 -1
- package/package.json +1 -1
@@ -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;
|
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,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;gCAQE,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;;;qCAiBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;;kDAKA,MAAM;uCAEjB,MAAM;;;kCAIX,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;;;;;;;CAQnB,CAAC"}
|
@@ -33,10 +33,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
33
33
|
};
|
34
34
|
})();
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
36
|
-
exports.REST_API = exports.METRICS_ROOT = exports.ROOT = void 0;
|
36
|
+
exports.REST_API = exports.BULLBOARD_ROOT = exports.METRICS_ROOT = exports.ROOT = void 0;
|
37
37
|
const CONTROLLERS = __importStar(require("./controllers"));
|
38
38
|
exports.ROOT = '/api';
|
39
39
|
exports.METRICS_ROOT = '/metrics';
|
40
|
+
exports.BULLBOARD_ROOT = '/queues';
|
40
41
|
exports.REST_API = {
|
41
42
|
AUTH: {
|
42
43
|
LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./get-status.command"), exports);
|
17
18
|
__exportStar(require("./login.command"), exports);
|
18
19
|
__exportStar(require("./register.command"), exports);
|
19
|
-
__exportStar(require("./get-status.command"), exports);
|
@@ -9,8 +9,8 @@ var CreateNodeCommand;
|
|
9
9
|
CreateNodeCommand.url = api_1.REST_API.NODES.CREATE;
|
10
10
|
CreateNodeCommand.TSQ_url = CreateNodeCommand.url;
|
11
11
|
CreateNodeCommand.RequestSchema = zod_1.z.object({
|
12
|
-
name: zod_1.z.string().min(5, '
|
13
|
-
address: zod_1.z.string().min(2, '
|
12
|
+
name: zod_1.z.string().min(5, 'Minimum 5 characters!'),
|
13
|
+
address: zod_1.z.string().min(2, 'Minimum 2 characters!'),
|
14
14
|
port: zod_1.z.number().int().min(1, 'Port is required').optional(),
|
15
15
|
isTrafficTrackingActive: zod_1.z.boolean().optional().default(false),
|
16
16
|
trafficLimitBytes: zod_1.z.optional(zod_1.z.number().int().min(0, 'Traffic limit must be greater than 0')),
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.CreateUserCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const constants_1 = require("../../constants");
|
6
5
|
const models_1 = require("../../models");
|
6
|
+
const constants_1 = require("../../constants");
|
7
7
|
const api_1 = require("../../api");
|
8
8
|
var CreateUserCommand;
|
9
9
|
(function (CreateUserCommand) {
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EnableUserCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var EnableUserCommand;
|
9
9
|
(function (EnableUserCommand) {
|
10
10
|
EnableUserCommand.url = api_1.REST_API.USERS.ENABLE_USER;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetAllUsersV2Command = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetAllUsersV2Command;
|
9
9
|
(function (GetAllUsersV2Command) {
|
10
10
|
GetAllUsersV2Command.url = api_1.REST_API.USERS.GET_ALL_V2;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserByEmailCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserByEmailCommand;
|
9
9
|
(function (GetUserByEmailCommand) {
|
10
10
|
GetUserByEmailCommand.url = api_1.REST_API.USERS.GET_BY_EMAIL;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserByShortUuidCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserByShortUuidCommand;
|
9
9
|
(function (GetUserByShortUuidCommand) {
|
10
10
|
GetUserByShortUuidCommand.url = api_1.REST_API.USERS.GET_BY_SHORT_UUID;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserBySubscriptionUuidCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserBySubscriptionUuidCommand;
|
9
9
|
(function (GetUserBySubscriptionUuidCommand) {
|
10
10
|
GetUserBySubscriptionUuidCommand.url = api_1.REST_API.USERS.GET_BY_SUBSCRIPTION_UUID;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserByTelegramIdCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserByTelegramIdCommand;
|
9
9
|
(function (GetUserByTelegramIdCommand) {
|
10
10
|
GetUserByTelegramIdCommand.url = api_1.REST_API.USERS.GET_BY_TELEGRAM_ID;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserByUuidCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserByUuidCommand;
|
9
9
|
(function (GetUserByUuidCommand) {
|
10
10
|
GetUserByUuidCommand.url = api_1.REST_API.USERS.GET_BY_UUID;
|
@@ -1,16 +1,16 @@
|
|
1
|
+
export * from './bulk';
|
1
2
|
export * from './create-user.command';
|
2
3
|
export * from './delete-user.command';
|
3
4
|
export * from './disable-user.command.ts';
|
4
5
|
export * from './enable-user.command';
|
5
6
|
export * from './get-all-users-v2.command';
|
7
|
+
export * from './get-user-by-email.command';
|
6
8
|
export * from './get-user-by-short-uuid.command';
|
7
9
|
export * from './get-user-by-subscription-uuid.command';
|
10
|
+
export * from './get-user-by-telegram-id.command';
|
8
11
|
export * from './get-user-by-username.command';
|
9
12
|
export * from './get-user-by-uuid.command';
|
10
13
|
export * from './reset-user-traffic.command';
|
11
14
|
export * from './revoke-user-subscription.command';
|
12
15
|
export * from './update-user.command';
|
13
|
-
export * from './bulk';
|
14
|
-
export * from './get-user-by-telegram-id.command';
|
15
|
-
export * from './get-user-by-email.command';
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC"}
|
@@ -14,18 +14,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./bulk"), exports);
|
17
18
|
__exportStar(require("./create-user.command"), exports);
|
18
19
|
__exportStar(require("./delete-user.command"), exports);
|
19
20
|
__exportStar(require("./disable-user.command.ts"), exports);
|
20
21
|
__exportStar(require("./enable-user.command"), exports);
|
21
22
|
__exportStar(require("./get-all-users-v2.command"), exports);
|
23
|
+
__exportStar(require("./get-user-by-email.command"), exports);
|
22
24
|
__exportStar(require("./get-user-by-short-uuid.command"), exports);
|
23
25
|
__exportStar(require("./get-user-by-subscription-uuid.command"), exports);
|
26
|
+
__exportStar(require("./get-user-by-telegram-id.command"), exports);
|
24
27
|
__exportStar(require("./get-user-by-username.command"), exports);
|
25
28
|
__exportStar(require("./get-user-by-uuid.command"), exports);
|
26
29
|
__exportStar(require("./reset-user-traffic.command"), exports);
|
27
30
|
__exportStar(require("./revoke-user-subscription.command"), exports);
|
28
31
|
__exportStar(require("./update-user.command"), exports);
|
29
|
-
__exportStar(require("./bulk"), exports);
|
30
|
-
__exportStar(require("./get-user-by-telegram-id.command"), exports);
|
31
|
-
__exportStar(require("./get-user-by-email.command"), exports);
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RevokeUserSubscriptionCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var RevokeUserSubscriptionCommand;
|
9
9
|
(function (RevokeUserSubscriptionCommand) {
|
10
10
|
RevokeUserSubscriptionCommand.url = api_1.REST_API.USERS.REVOKE_SUBSCRIPTION;
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.UpdateUserCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const constants_1 = require("../../constants");
|
6
5
|
const models_1 = require("../../models");
|
6
|
+
const constants_1 = require("../../constants");
|
7
7
|
const api_1 = require("../../api");
|
8
8
|
var UpdateUserCommand;
|
9
9
|
(function (UpdateUserCommand) {
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
2
2
|
export declare namespace UpdateXrayConfigCommand {
|
3
3
|
const url: "/api/xray/update-config";
|
4
4
|
const TSQ_url: "/api/xray/update-config";
|
5
|
-
const RequestSchema: z.ZodObject<{}, "
|
5
|
+
const RequestSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
|
6
6
|
type Request = z.infer<typeof RequestSchema>;
|
7
7
|
const ResponseSchema: z.ZodObject<{
|
8
8
|
response: z.ZodObject<{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update-config.command.d.ts","sourceRoot":"","sources":["../../../../commands/xray/update-config.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,2BAA8B,CAAC;IACxC,MAAM,OAAO,2BAAM,CAAC;IAEpB,MAAM,aAAa,
|
1
|
+
{"version":3,"file":"update-config.command.d.ts","sourceRoot":"","sources":["../../../../commands/xray/update-config.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,2BAA8B,CAAC;IACxC,MAAM,OAAO,2BAAM,CAAC;IAEpB,MAAM,aAAa,uJAA6B,CAAC;IAExD,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -7,7 +7,7 @@ var UpdateXrayConfigCommand;
|
|
7
7
|
(function (UpdateXrayConfigCommand) {
|
8
8
|
UpdateXrayConfigCommand.url = api_1.REST_API.XRAY.UPDATE_CONFIG;
|
9
9
|
UpdateXrayConfigCommand.TSQ_url = UpdateXrayConfigCommand.url;
|
10
|
-
UpdateXrayConfigCommand.RequestSchema = zod_1.z.object({});
|
10
|
+
UpdateXrayConfigCommand.RequestSchema = zod_1.z.object({}).passthrough();
|
11
11
|
UpdateXrayConfigCommand.ResponseSchema = zod_1.z.object({
|
12
12
|
response: zod_1.z.object({
|
13
13
|
config: zod_1.z.unknown(),
|
@@ -364,5 +364,10 @@ export declare const ERRORS: {
|
|
364
364
|
readonly message: "Forbidden";
|
365
365
|
readonly httpCode: 403;
|
366
366
|
};
|
367
|
+
readonly DISABLE_NODE_ERROR: {
|
368
|
+
readonly code: "A069";
|
369
|
+
readonly message: "Disable node error";
|
370
|
+
readonly httpCode: 500;
|
371
|
+
};
|
367
372
|
};
|
368
373
|
//# sourceMappingURL=errors.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC3B,CAAC"}
|
@@ -335,4 +335,9 @@ exports.ERRORS = {
|
|
335
335
|
},
|
336
336
|
GET_AUTH_STATUS_ERROR: { code: 'A067', message: 'Get auth status error', httpCode: 500 },
|
337
337
|
FORBIDDEN: { code: 'A068', message: 'Forbidden', httpCode: 403 },
|
338
|
+
DISABLE_NODE_ERROR: {
|
339
|
+
code: 'A069',
|
340
|
+
message: 'Disable node error',
|
341
|
+
httpCode: 500,
|
342
|
+
},
|
338
343
|
};
|
@@ -1,9 +1,9 @@
|
|
1
1
|
export * from './errors';
|
2
2
|
export * from './events';
|
3
3
|
export * from './hosts';
|
4
|
+
export * from './metrics';
|
4
5
|
export * from './nodes';
|
5
6
|
export * from './roles';
|
6
7
|
export * from './templates';
|
7
8
|
export * from './users';
|
8
|
-
export * from './metrics';
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./errors"), exports);
|
18
18
|
__exportStar(require("./events"), exports);
|
19
19
|
__exportStar(require("./hosts"), exports);
|
20
|
+
__exportStar(require("./metrics"), exports);
|
20
21
|
__exportStar(require("./nodes"), exports);
|
21
22
|
__exportStar(require("./roles"), exports);
|
22
23
|
__exportStar(require("./templates"), exports);
|
23
24
|
__exportStar(require("./users"), exports);
|
24
|
-
__exportStar(require("./metrics"), exports);
|
@@ -3,7 +3,7 @@ export * from './auth.schema';
|
|
3
3
|
export * from './base-stat.schema';
|
4
4
|
export * from './hosts.schema';
|
5
5
|
export * from './inbounds.schema';
|
6
|
+
export * from './last-connected-node.schema';
|
6
7
|
export * from './nodes.schema';
|
7
8
|
export * from './users.schema';
|
8
|
-
export * from './last-connected-node.schema';
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
@@ -19,6 +19,6 @@ __exportStar(require("./auth.schema"), exports);
|
|
19
19
|
__exportStar(require("./base-stat.schema"), exports);
|
20
20
|
__exportStar(require("./hosts.schema"), exports);
|
21
21
|
__exportStar(require("./inbounds.schema"), exports);
|
22
|
+
__exportStar(require("./last-connected-node.schema"), exports);
|
22
23
|
__exportStar(require("./nodes.schema"), exports);
|
23
24
|
__exportStar(require("./users.schema"), exports);
|
24
|
-
__exportStar(require("./last-connected-node.schema"), exports);
|
@@ -33,10 +33,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
33
33
|
};
|
34
34
|
})();
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
36
|
-
exports.REST_API = exports.METRICS_ROOT = exports.ROOT = void 0;
|
36
|
+
exports.REST_API = exports.BULLBOARD_ROOT = exports.METRICS_ROOT = exports.ROOT = void 0;
|
37
37
|
const CONTROLLERS = __importStar(require("./controllers"));
|
38
38
|
exports.ROOT = '/api';
|
39
39
|
exports.METRICS_ROOT = '/metrics';
|
40
|
+
exports.BULLBOARD_ROOT = '/queues';
|
40
41
|
exports.REST_API = {
|
41
42
|
AUTH: {
|
42
43
|
LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./get-status.command"), exports);
|
17
18
|
__exportStar(require("./login.command"), exports);
|
18
19
|
__exportStar(require("./register.command"), exports);
|
19
|
-
__exportStar(require("./get-status.command"), exports);
|
@@ -9,8 +9,8 @@ var CreateNodeCommand;
|
|
9
9
|
CreateNodeCommand.url = api_1.REST_API.NODES.CREATE;
|
10
10
|
CreateNodeCommand.TSQ_url = CreateNodeCommand.url;
|
11
11
|
CreateNodeCommand.RequestSchema = zod_1.z.object({
|
12
|
-
name: zod_1.z.string().min(5, '
|
13
|
-
address: zod_1.z.string().min(2, '
|
12
|
+
name: zod_1.z.string().min(5, 'Minimum 5 characters!'),
|
13
|
+
address: zod_1.z.string().min(2, 'Minimum 2 characters!'),
|
14
14
|
port: zod_1.z.number().int().min(1, 'Port is required').optional(),
|
15
15
|
isTrafficTrackingActive: zod_1.z.boolean().optional().default(false),
|
16
16
|
trafficLimitBytes: zod_1.z.optional(zod_1.z.number().int().min(0, 'Traffic limit must be greater than 0')),
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.CreateUserCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const constants_1 = require("../../constants");
|
6
5
|
const models_1 = require("../../models");
|
6
|
+
const constants_1 = require("../../constants");
|
7
7
|
const api_1 = require("../../api");
|
8
8
|
var CreateUserCommand;
|
9
9
|
(function (CreateUserCommand) {
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EnableUserCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var EnableUserCommand;
|
9
9
|
(function (EnableUserCommand) {
|
10
10
|
EnableUserCommand.url = api_1.REST_API.USERS.ENABLE_USER;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetAllUsersV2Command = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetAllUsersV2Command;
|
9
9
|
(function (GetAllUsersV2Command) {
|
10
10
|
GetAllUsersV2Command.url = api_1.REST_API.USERS.GET_ALL_V2;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserByEmailCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserByEmailCommand;
|
9
9
|
(function (GetUserByEmailCommand) {
|
10
10
|
GetUserByEmailCommand.url = api_1.REST_API.USERS.GET_BY_EMAIL;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserByShortUuidCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserByShortUuidCommand;
|
9
9
|
(function (GetUserByShortUuidCommand) {
|
10
10
|
GetUserByShortUuidCommand.url = api_1.REST_API.USERS.GET_BY_SHORT_UUID;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserBySubscriptionUuidCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserBySubscriptionUuidCommand;
|
9
9
|
(function (GetUserBySubscriptionUuidCommand) {
|
10
10
|
GetUserBySubscriptionUuidCommand.url = api_1.REST_API.USERS.GET_BY_SUBSCRIPTION_UUID;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserByTelegramIdCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserByTelegramIdCommand;
|
9
9
|
(function (GetUserByTelegramIdCommand) {
|
10
10
|
GetUserByTelegramIdCommand.url = api_1.REST_API.USERS.GET_BY_TELEGRAM_ID;
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserByUuidCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var GetUserByUuidCommand;
|
9
9
|
(function (GetUserByUuidCommand) {
|
10
10
|
GetUserByUuidCommand.url = api_1.REST_API.USERS.GET_BY_UUID;
|
@@ -14,18 +14,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./bulk"), exports);
|
17
18
|
__exportStar(require("./create-user.command"), exports);
|
18
19
|
__exportStar(require("./delete-user.command"), exports);
|
19
20
|
__exportStar(require("./disable-user.command.ts"), exports);
|
20
21
|
__exportStar(require("./enable-user.command"), exports);
|
21
22
|
__exportStar(require("./get-all-users-v2.command"), exports);
|
23
|
+
__exportStar(require("./get-user-by-email.command"), exports);
|
22
24
|
__exportStar(require("./get-user-by-short-uuid.command"), exports);
|
23
25
|
__exportStar(require("./get-user-by-subscription-uuid.command"), exports);
|
26
|
+
__exportStar(require("./get-user-by-telegram-id.command"), exports);
|
24
27
|
__exportStar(require("./get-user-by-username.command"), exports);
|
25
28
|
__exportStar(require("./get-user-by-uuid.command"), exports);
|
26
29
|
__exportStar(require("./reset-user-traffic.command"), exports);
|
27
30
|
__exportStar(require("./revoke-user-subscription.command"), exports);
|
28
31
|
__exportStar(require("./update-user.command"), exports);
|
29
|
-
__exportStar(require("./bulk"), exports);
|
30
|
-
__exportStar(require("./get-user-by-telegram-id.command"), exports);
|
31
|
-
__exportStar(require("./get-user-by-email.command"), exports);
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RevokeUserSubscriptionCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const users_schema_1 = require("../../models/users.schema");
|
6
|
-
const api_1 = require("../../api");
|
7
6
|
const models_1 = require("../../models");
|
7
|
+
const api_1 = require("../../api");
|
8
8
|
var RevokeUserSubscriptionCommand;
|
9
9
|
(function (RevokeUserSubscriptionCommand) {
|
10
10
|
RevokeUserSubscriptionCommand.url = api_1.REST_API.USERS.REVOKE_SUBSCRIPTION;
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.UpdateUserCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const constants_1 = require("../../constants");
|
6
5
|
const models_1 = require("../../models");
|
6
|
+
const constants_1 = require("../../constants");
|
7
7
|
const api_1 = require("../../api");
|
8
8
|
var UpdateUserCommand;
|
9
9
|
(function (UpdateUserCommand) {
|
@@ -7,7 +7,7 @@ var UpdateXrayConfigCommand;
|
|
7
7
|
(function (UpdateXrayConfigCommand) {
|
8
8
|
UpdateXrayConfigCommand.url = api_1.REST_API.XRAY.UPDATE_CONFIG;
|
9
9
|
UpdateXrayConfigCommand.TSQ_url = UpdateXrayConfigCommand.url;
|
10
|
-
UpdateXrayConfigCommand.RequestSchema = zod_1.z.object({});
|
10
|
+
UpdateXrayConfigCommand.RequestSchema = zod_1.z.object({}).passthrough();
|
11
11
|
UpdateXrayConfigCommand.ResponseSchema = zod_1.z.object({
|
12
12
|
response: zod_1.z.object({
|
13
13
|
config: zod_1.z.unknown(),
|
@@ -335,4 +335,9 @@ exports.ERRORS = {
|
|
335
335
|
},
|
336
336
|
GET_AUTH_STATUS_ERROR: { code: 'A067', message: 'Get auth status error', httpCode: 500 },
|
337
337
|
FORBIDDEN: { code: 'A068', message: 'Forbidden', httpCode: 403 },
|
338
|
+
DISABLE_NODE_ERROR: {
|
339
|
+
code: 'A069',
|
340
|
+
message: 'Disable node error',
|
341
|
+
httpCode: 500,
|
342
|
+
},
|
338
343
|
};
|
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./errors"), exports);
|
18
18
|
__exportStar(require("./events"), exports);
|
19
19
|
__exportStar(require("./hosts"), exports);
|
20
|
+
__exportStar(require("./metrics"), exports);
|
20
21
|
__exportStar(require("./nodes"), exports);
|
21
22
|
__exportStar(require("./roles"), exports);
|
22
23
|
__exportStar(require("./templates"), exports);
|
23
24
|
__exportStar(require("./users"), exports);
|
24
|
-
__exportStar(require("./metrics"), exports);
|
@@ -19,6 +19,6 @@ __exportStar(require("./auth.schema"), exports);
|
|
19
19
|
__exportStar(require("./base-stat.schema"), exports);
|
20
20
|
__exportStar(require("./hosts.schema"), exports);
|
21
21
|
__exportStar(require("./inbounds.schema"), exports);
|
22
|
+
__exportStar(require("./last-connected-node.schema"), exports);
|
22
23
|
__exportStar(require("./nodes.schema"), exports);
|
23
24
|
__exportStar(require("./users.schema"), exports);
|
24
|
-
__exportStar(require("./last-connected-node.schema"), exports);
|