@remnawave/backend-contract 0.0.45 → 0.0.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/build/commands/api-tokens/create.command.js +1 -0
  2. package/build/commands/api-tokens/delete.command.js +1 -0
  3. package/build/commands/api-tokens/find.command.js +1 -0
  4. package/build/commands/auth/login.command.js +1 -0
  5. package/build/commands/hosts/create.command.js +1 -0
  6. package/build/commands/hosts/delete.command.js +1 -0
  7. package/build/commands/hosts/get-all.command.js +1 -0
  8. package/build/commands/hosts/reorder.command.js +1 -0
  9. package/build/commands/hosts/update.command.js +1 -0
  10. package/build/commands/inbounds/get-inbounds.command.js +1 -0
  11. package/build/commands/keygen/get-pubkey.command.js +1 -0
  12. package/build/commands/nodes/create.command.js +1 -0
  13. package/build/commands/nodes/delete.command.js +1 -0
  14. package/build/commands/nodes/disable.command.js +1 -0
  15. package/build/commands/nodes/enable.command.js +1 -0
  16. package/build/commands/nodes/get-all.command.js +1 -0
  17. package/build/commands/nodes/restart-all.command.js +1 -0
  18. package/build/commands/nodes/restart.command.js +1 -0
  19. package/build/commands/nodes/update.command.js +1 -0
  20. package/build/commands/subscription/get-subscription-by-short-uuid.command.js +1 -0
  21. package/build/commands/subscription/get-subscription-info-by-short-uuid.command.js +1 -0
  22. package/build/commands/system/get-bandwidth-stats.command.js +1 -0
  23. package/build/commands/system/get-nodes-statistics.js +1 -0
  24. package/build/commands/system/get-stats.command.js +1 -0
  25. package/build/commands/users/create-user.command.js +2 -1
  26. package/build/commands/users/delete-user.command.js +1 -0
  27. package/build/commands/users/disable-user.command.ts.js +1 -0
  28. package/build/commands/users/enable-user.command.js +1 -0
  29. package/build/commands/users/get-all-users-v2.command.js +1 -0
  30. package/build/commands/users/get-all-users.command.js +1 -0
  31. package/build/commands/users/get-user-by-short-uuid.command.js +1 -0
  32. package/build/commands/users/get-user-by-subscription-uuid.command.js +1 -0
  33. package/build/commands/users/get-user-by-uuid.command.js +1 -0
  34. package/build/commands/users/revoke-user-subscription.command.js +1 -0
  35. package/build/commands/users/update-user.command.js +1 -0
  36. package/build/commands/xray/get-config.command.js +1 -0
  37. package/build/commands/xray/update-config.command.js +1 -0
  38. package/commands/api-tokens/create.command.ts +1 -0
  39. package/commands/api-tokens/delete.command.ts +1 -0
  40. package/commands/api-tokens/find.command.ts +1 -0
  41. package/commands/auth/login.command.ts +1 -0
  42. package/commands/hosts/create.command.ts +1 -0
  43. package/commands/hosts/delete.command.ts +1 -0
  44. package/commands/hosts/get-all.command.ts +1 -0
  45. package/commands/hosts/reorder.command.ts +1 -0
  46. package/commands/hosts/update.command.ts +3 -2
  47. package/commands/inbounds/get-inbounds.command.ts +1 -0
  48. package/commands/keygen/get-pubkey.command.ts +1 -0
  49. package/commands/nodes/create.command.ts +1 -0
  50. package/commands/nodes/delete.command.ts +1 -0
  51. package/commands/nodes/disable.command.ts +1 -0
  52. package/commands/nodes/enable.command.ts +1 -0
  53. package/commands/nodes/get-all.command.ts +1 -0
  54. package/commands/nodes/restart-all.command.ts +1 -0
  55. package/commands/nodes/restart.command.ts +1 -0
  56. package/commands/nodes/update.command.ts +1 -0
  57. package/commands/subscription/get-subscription-by-short-uuid.command.ts +1 -0
  58. package/commands/subscription/get-subscription-info-by-short-uuid.command.ts +1 -0
  59. package/commands/system/get-bandwidth-stats.command.ts +1 -0
  60. package/commands/system/get-nodes-statistics.ts +1 -0
  61. package/commands/system/get-stats.command.ts +1 -0
  62. package/commands/users/create-user.command.ts +3 -2
  63. package/commands/users/delete-user.command.ts +1 -0
  64. package/commands/users/disable-user.command.ts.ts +1 -0
  65. package/commands/users/enable-user.command.ts +1 -0
  66. package/commands/users/get-all-users-v2.command.ts +1 -0
  67. package/commands/users/get-all-users.command.ts +1 -0
  68. package/commands/users/get-user-by-short-uuid.command.ts +1 -0
  69. package/commands/users/get-user-by-subscription-uuid.command.ts +1 -0
  70. package/commands/users/get-user-by-uuid.command.ts +1 -0
  71. package/commands/users/revoke-user-subscription.command.ts +1 -0
  72. package/commands/users/update-user.command.ts +1 -0
  73. package/commands/xray/get-config.command.ts +2 -0
  74. package/commands/xray/update-config.command.ts +1 -0
  75. package/package.json +1 -1
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var CreateApiTokenCommand;
7
7
  (function (CreateApiTokenCommand) {
8
8
  CreateApiTokenCommand.url = api_1.REST_API.API_TOKENS.CREATE;
9
+ CreateApiTokenCommand.TSQ_url = CreateApiTokenCommand.url;
9
10
  CreateApiTokenCommand.RequestSchema = zod_1.z.object({
10
11
  tokenName: zod_1.z.string(),
11
12
  tokenDescription: zod_1.z.string().nullable(),
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var DeleteApiTokenCommand;
7
7
  (function (DeleteApiTokenCommand) {
8
8
  DeleteApiTokenCommand.url = api_1.REST_API.API_TOKENS.DELETE;
9
+ DeleteApiTokenCommand.TSQ_url = DeleteApiTokenCommand.url(':uuid');
9
10
  DeleteApiTokenCommand.RequestSchema = zod_1.z.object({
10
11
  uuid: zod_1.z.string().uuid(),
11
12
  });
@@ -7,6 +7,7 @@ const api_tokens_schema_1 = require("../../models/api-tokens.schema");
7
7
  var FindAllApiTokensCommand;
8
8
  (function (FindAllApiTokensCommand) {
9
9
  FindAllApiTokensCommand.url = api_1.REST_API.API_TOKENS.GET_ALL;
10
+ FindAllApiTokensCommand.TSQ_url = FindAllApiTokensCommand.url;
10
11
  FindAllApiTokensCommand.ResponseSchema = zod_1.z.object({
11
12
  response: zod_1.z.array(api_tokens_schema_1.ApiTokensSchema),
12
13
  });
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var LoginCommand;
7
7
  (function (LoginCommand) {
8
8
  LoginCommand.url = api_1.REST_API.AUTH.LOGIN;
9
+ LoginCommand.TSQ_url = LoginCommand.url;
9
10
  LoginCommand.RequestSchema = zod_1.z.object({
10
11
  username: zod_1.z.string(),
11
12
  password: zod_1.z.string(),
@@ -9,6 +9,7 @@ const models_1 = require("../../models");
9
9
  var CreateHostCommand;
10
10
  (function (CreateHostCommand) {
11
11
  CreateHostCommand.url = api_1.REST_API.HOSTS.CREATE;
12
+ CreateHostCommand.TSQ_url = CreateHostCommand.url;
12
13
  CreateHostCommand.RequestSchema = zod_1.z.object({
13
14
  inboundUuid: zod_1.z
14
15
  .string({
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var DeleteHostCommand;
7
7
  (function (DeleteHostCommand) {
8
8
  DeleteHostCommand.url = api_1.REST_API.HOSTS.DELETE;
9
+ DeleteHostCommand.TSQ_url = DeleteHostCommand.url(':uuid');
9
10
  DeleteHostCommand.RequestSchema = zod_1.z.object({
10
11
  uuid: zod_1.z.string().uuid(),
11
12
  });
@@ -7,6 +7,7 @@ const models_1 = require("../../models");
7
7
  var GetAllHostsCommand;
8
8
  (function (GetAllHostsCommand) {
9
9
  GetAllHostsCommand.url = api_1.REST_API.HOSTS.GET_ALL;
10
+ GetAllHostsCommand.TSQ_url = GetAllHostsCommand.url;
10
11
  GetAllHostsCommand.ResponseSchema = zod_1.z.object({
11
12
  response: zod_1.z.array(models_1.HostsSchema),
12
13
  });
@@ -7,6 +7,7 @@ const models_1 = require("../../models");
7
7
  var ReorderHostCommand;
8
8
  (function (ReorderHostCommand) {
9
9
  ReorderHostCommand.url = api_1.REST_API.HOSTS.REORDER;
10
+ ReorderHostCommand.TSQ_url = ReorderHostCommand.url;
10
11
  ReorderHostCommand.RequestSchema = zod_1.z.object({
11
12
  hosts: zod_1.z.array(models_1.HostsSchema.pick({
12
13
  viewPosition: true,
@@ -9,6 +9,7 @@ const models_1 = require("../../models");
9
9
  var UpdateHostCommand;
10
10
  (function (UpdateHostCommand) {
11
11
  UpdateHostCommand.url = api_1.REST_API.HOSTS.UPDATE;
12
+ UpdateHostCommand.TSQ_url = UpdateHostCommand.url;
12
13
  UpdateHostCommand.RequestSchema = models_1.HostsSchema.pick({
13
14
  uuid: true,
14
15
  }).extend({
@@ -7,6 +7,7 @@ const inbounds_schema_1 = require("../../models/inbounds.schema");
7
7
  var GetInboundsCommand;
8
8
  (function (GetInboundsCommand) {
9
9
  GetInboundsCommand.url = api_1.REST_API.INBOUNDS.GET_INBOUNDS;
10
+ GetInboundsCommand.TSQ_url = GetInboundsCommand.url;
10
11
  GetInboundsCommand.ResponseSchema = zod_1.z.object({
11
12
  response: zod_1.z.array(inbounds_schema_1.InboundsSchema),
12
13
  });
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var GetPubKeyCommand;
7
7
  (function (GetPubKeyCommand) {
8
8
  GetPubKeyCommand.url = api_1.REST_API.KEYGEN.GET;
9
+ GetPubKeyCommand.TSQ_url = GetPubKeyCommand.url;
9
10
  GetPubKeyCommand.ResponseSchema = zod_1.z.object({
10
11
  response: zod_1.z.object({
11
12
  pubKey: zod_1.z.string(),
@@ -7,6 +7,7 @@ const models_1 = require("../../models");
7
7
  var CreateNodeCommand;
8
8
  (function (CreateNodeCommand) {
9
9
  CreateNodeCommand.url = api_1.REST_API.NODES.CREATE;
10
+ CreateNodeCommand.TSQ_url = CreateNodeCommand.url;
10
11
  CreateNodeCommand.RequestSchema = models_1.NodesSchema.pick({}).extend({
11
12
  name: zod_1.z.string().min(5, 'Name is required'),
12
13
  address: zod_1.z.string().min(2, 'Address is required'),
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var DeleteNodeCommand;
7
7
  (function (DeleteNodeCommand) {
8
8
  DeleteNodeCommand.url = api_1.REST_API.NODES.DELETE;
9
+ DeleteNodeCommand.TSQ_url = DeleteNodeCommand.url(':uuid');
9
10
  DeleteNodeCommand.RequestSchema = zod_1.z.object({
10
11
  uuid: zod_1.z.string().uuid(),
11
12
  });
@@ -7,6 +7,7 @@ const models_1 = require("../../models");
7
7
  var DisableNodeCommand;
8
8
  (function (DisableNodeCommand) {
9
9
  DisableNodeCommand.url = api_1.REST_API.NODES.DISABLE;
10
+ DisableNodeCommand.TSQ_url = DisableNodeCommand.url(':uuid');
10
11
  DisableNodeCommand.RequestSchema = zod_1.z.object({
11
12
  uuid: zod_1.z.string().uuid(),
12
13
  });
@@ -7,6 +7,7 @@ const models_1 = require("../../models");
7
7
  var EnableNodeCommand;
8
8
  (function (EnableNodeCommand) {
9
9
  EnableNodeCommand.url = api_1.REST_API.NODES.ENABLE;
10
+ EnableNodeCommand.TSQ_url = EnableNodeCommand.url(':uuid');
10
11
  EnableNodeCommand.RequestSchema = zod_1.z.object({
11
12
  uuid: zod_1.z.string().uuid(),
12
13
  });
@@ -7,6 +7,7 @@ const models_1 = require("../../models");
7
7
  var GetAllNodesCommand;
8
8
  (function (GetAllNodesCommand) {
9
9
  GetAllNodesCommand.url = api_1.REST_API.NODES.GET_ALL;
10
+ GetAllNodesCommand.TSQ_url = GetAllNodesCommand.url;
10
11
  GetAllNodesCommand.ResponseSchema = zod_1.z.object({
11
12
  response: zod_1.z.array(models_1.NodesSchema),
12
13
  });
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var RestartAllNodesCommand;
7
7
  (function (RestartAllNodesCommand) {
8
8
  RestartAllNodesCommand.url = api_1.REST_API.NODES.RESTART_ALL;
9
+ RestartAllNodesCommand.TSQ_url = RestartAllNodesCommand.url;
9
10
  RestartAllNodesCommand.ResponseSchema = zod_1.z.object({
10
11
  response: zod_1.z.object({
11
12
  eventSent: zod_1.z.boolean(),
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var RestartNodeCommand;
7
7
  (function (RestartNodeCommand) {
8
8
  RestartNodeCommand.url = api_1.REST_API.NODES.RESTART;
9
+ RestartNodeCommand.TSQ_url = RestartNodeCommand.url(':uuid');
9
10
  RestartNodeCommand.RequestSchema = zod_1.z.object({
10
11
  uuid: zod_1.z.string().uuid(),
11
12
  });
@@ -7,6 +7,7 @@ const models_1 = require("../../models");
7
7
  var UpdateNodeCommand;
8
8
  (function (UpdateNodeCommand) {
9
9
  UpdateNodeCommand.url = api_1.REST_API.NODES.UPDATE;
10
+ UpdateNodeCommand.TSQ_url = UpdateNodeCommand.url;
10
11
  UpdateNodeCommand.RequestSchema = models_1.NodesSchema.pick({
11
12
  uuid: true,
12
13
  }).extend({
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var GetSubscriptionByShortUuidCommand;
7
7
  (function (GetSubscriptionByShortUuidCommand) {
8
8
  GetSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET;
9
+ GetSubscriptionByShortUuidCommand.TSQ_url = GetSubscriptionByShortUuidCommand.url(':shortUuid');
9
10
  GetSubscriptionByShortUuidCommand.RequestSchema = zod_1.z.object({
10
11
  shortUuid: zod_1.z.string(),
11
12
  });
@@ -7,6 +7,7 @@ const constants_1 = require("../../constants");
7
7
  var GetSubscriptionInfoByShortUuidCommand;
8
8
  (function (GetSubscriptionInfoByShortUuidCommand) {
9
9
  GetSubscriptionInfoByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_INFO;
10
+ GetSubscriptionInfoByShortUuidCommand.TSQ_url = GetSubscriptionInfoByShortUuidCommand.url(':shortUuid');
10
11
  GetSubscriptionInfoByShortUuidCommand.RequestSchema = zod_1.z.object({
11
12
  shortUuid: zod_1.z.string(),
12
13
  });
@@ -7,6 +7,7 @@ const base_stat_schema_1 = require("../../models/base-stat.schema");
7
7
  var GetBandwidthStatsCommand;
8
8
  (function (GetBandwidthStatsCommand) {
9
9
  GetBandwidthStatsCommand.url = api_1.REST_API.SYSTEM.BANDWIDTH;
10
+ GetBandwidthStatsCommand.TSQ_url = GetBandwidthStatsCommand.url;
10
11
  GetBandwidthStatsCommand.RequestQuerySchema = zod_1.z.object({
11
12
  tz: zod_1.z.string().optional(),
12
13
  });
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var GetNodesStatisticsCommand;
7
7
  (function (GetNodesStatisticsCommand) {
8
8
  GetNodesStatisticsCommand.url = api_1.REST_API.SYSTEM.NODES_STATISTIC;
9
+ GetNodesStatisticsCommand.TSQ_url = GetNodesStatisticsCommand.url;
9
10
  GetNodesStatisticsCommand.RequestQuerySchema = zod_1.z.object({
10
11
  tz: zod_1.z.string().optional(),
11
12
  });
@@ -7,6 +7,7 @@ const constants_1 = require("../../constants");
7
7
  var GetStatsCommand;
8
8
  (function (GetStatsCommand) {
9
9
  GetStatsCommand.url = api_1.REST_API.SYSTEM.STATS;
10
+ GetStatsCommand.TSQ_url = GetStatsCommand.url;
10
11
  GetStatsCommand.RequestQuerySchema = zod_1.z.object({
11
12
  tz: zod_1.z.string().optional(),
12
13
  });
@@ -8,7 +8,8 @@ const models_1 = require("../../models");
8
8
  var CreateUserCommand;
9
9
  (function (CreateUserCommand) {
10
10
  CreateUserCommand.url = api_1.REST_API.USERS.CREATE;
11
- CreateUserCommand.RequestSchema = models_1.UsersSchema.pick({}).extend({
11
+ CreateUserCommand.TSQ_url = CreateUserCommand.url;
12
+ CreateUserCommand.RequestSchema = zod_1.z.object({
12
13
  username: zod_1.z
13
14
  .string({
14
15
  required_error: 'Username is required',
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var DeleteUserCommand;
7
7
  (function (DeleteUserCommand) {
8
8
  DeleteUserCommand.url = api_1.REST_API.USERS.DELETE_USER;
9
+ DeleteUserCommand.TSQ_url = DeleteUserCommand.url(':uuid');
9
10
  DeleteUserCommand.RequestSchema = zod_1.z.object({
10
11
  uuid: zod_1.z.string().uuid(),
11
12
  });
@@ -7,6 +7,7 @@ const users_schema_1 = require("../../models/users.schema");
7
7
  var DisableUserCommand;
8
8
  (function (DisableUserCommand) {
9
9
  DisableUserCommand.url = api_1.REST_API.USERS.DISABLE_USER;
10
+ DisableUserCommand.TSQ_url = DisableUserCommand.url(':uuid');
10
11
  DisableUserCommand.RequestSchema = zod_1.z.object({
11
12
  uuid: zod_1.z.string().uuid(),
12
13
  });
@@ -7,6 +7,7 @@ const users_schema_1 = require("../../models/users.schema");
7
7
  var EnableUserCommand;
8
8
  (function (EnableUserCommand) {
9
9
  EnableUserCommand.url = api_1.REST_API.USERS.ENABLE_USER;
10
+ EnableUserCommand.TSQ_url = EnableUserCommand.url(':uuid');
10
11
  EnableUserCommand.RequestSchema = zod_1.z.object({
11
12
  uuid: zod_1.z.string().uuid(),
12
13
  });
@@ -7,6 +7,7 @@ const users_schema_1 = require("../../models/users.schema");
7
7
  var GetAllUsersV2Command;
8
8
  (function (GetAllUsersV2Command) {
9
9
  GetAllUsersV2Command.url = api_1.REST_API.USERS.GET_ALL_V2;
10
+ GetAllUsersV2Command.TSQ_url = GetAllUsersV2Command.url;
10
11
  const FilterSchema = zod_1.z.object({
11
12
  id: zod_1.z.string(),
12
13
  value: zod_1.z.string(),
@@ -7,6 +7,7 @@ const users_schema_1 = require("../../models/users.schema");
7
7
  var GetAllUsersCommand;
8
8
  (function (GetAllUsersCommand) {
9
9
  GetAllUsersCommand.url = api_1.REST_API.USERS.GET_ALL;
10
+ GetAllUsersCommand.TSQ_url = GetAllUsersCommand.url;
10
11
  GetAllUsersCommand.SortableFields = [
11
12
  'username',
12
13
  'status',
@@ -7,6 +7,7 @@ const users_schema_1 = require("../../models/users.schema");
7
7
  var GetUserByShortUuidCommand;
8
8
  (function (GetUserByShortUuidCommand) {
9
9
  GetUserByShortUuidCommand.url = api_1.REST_API.USERS.GET_BY_SHORT_UUID;
10
+ GetUserByShortUuidCommand.TSQ_url = GetUserByShortUuidCommand.url(':shortUuid');
10
11
  GetUserByShortUuidCommand.RequestSchema = zod_1.z.object({
11
12
  shortUuid: zod_1.z.string(),
12
13
  });
@@ -7,6 +7,7 @@ const users_schema_1 = require("../../models/users.schema");
7
7
  var GetUserBySubscriptionUuidCommand;
8
8
  (function (GetUserBySubscriptionUuidCommand) {
9
9
  GetUserBySubscriptionUuidCommand.url = api_1.REST_API.USERS.GET_BY_SUBSCRIPTION_UUID;
10
+ GetUserBySubscriptionUuidCommand.TSQ_url = GetUserBySubscriptionUuidCommand.url(':subscriptionUuid');
10
11
  GetUserBySubscriptionUuidCommand.RequestSchema = zod_1.z.object({
11
12
  subscriptionUuid: zod_1.z.string(),
12
13
  });
@@ -7,6 +7,7 @@ const users_schema_1 = require("../../models/users.schema");
7
7
  var GetUserByUuidCommand;
8
8
  (function (GetUserByUuidCommand) {
9
9
  GetUserByUuidCommand.url = api_1.REST_API.USERS.GET_BY_UUID;
10
+ GetUserByUuidCommand.TSQ_url = GetUserByUuidCommand.url(':uuid');
10
11
  GetUserByUuidCommand.RequestSchema = zod_1.z.object({
11
12
  uuid: zod_1.z.string().uuid(),
12
13
  });
@@ -7,6 +7,7 @@ const users_schema_1 = require("../../models/users.schema");
7
7
  var RevokeUserSubscriptionCommand;
8
8
  (function (RevokeUserSubscriptionCommand) {
9
9
  RevokeUserSubscriptionCommand.url = api_1.REST_API.USERS.REVOKE_SUBSCRIPTION;
10
+ RevokeUserSubscriptionCommand.TSQ_url = RevokeUserSubscriptionCommand.url(':uuid');
10
11
  RevokeUserSubscriptionCommand.RequestSchema = zod_1.z.object({
11
12
  uuid: zod_1.z.string().uuid(),
12
13
  });
@@ -8,6 +8,7 @@ const models_1 = require("../../models");
8
8
  var UpdateUserCommand;
9
9
  (function (UpdateUserCommand) {
10
10
  UpdateUserCommand.url = api_1.REST_API.USERS.UPDATE;
11
+ UpdateUserCommand.TSQ_url = UpdateUserCommand.url;
11
12
  UpdateUserCommand.RequestSchema = models_1.UsersSchema.pick({
12
13
  uuid: true,
13
14
  }).extend({
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var GetXrayConfigCommand;
7
7
  (function (GetXrayConfigCommand) {
8
8
  GetXrayConfigCommand.url = api_1.REST_API.XRAY.GET_CONFIG;
9
+ GetXrayConfigCommand.TSQ_url = GetXrayConfigCommand.url;
9
10
  GetXrayConfigCommand.ResponseSchema = zod_1.z.object({
10
11
  response: zod_1.z.object({
11
12
  config: zod_1.z.record(zod_1.z.any()),
@@ -6,6 +6,7 @@ const api_1 = require("../../api");
6
6
  var UpdateXrayConfigCommand;
7
7
  (function (UpdateXrayConfigCommand) {
8
8
  UpdateXrayConfigCommand.url = api_1.REST_API.XRAY.UPDATE_CONFIG;
9
+ UpdateXrayConfigCommand.TSQ_url = UpdateXrayConfigCommand.url;
9
10
  UpdateXrayConfigCommand.RequestSchema = zod_1.z.record(zod_1.z.any());
10
11
  UpdateXrayConfigCommand.ResponseSchema = zod_1.z.object({
11
12
  response: zod_1.z.object({
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
 
4
4
  export namespace CreateApiTokenCommand {
5
5
  export const url = REST_API.API_TOKENS.CREATE;
6
+ export const TSQ_url = url;
6
7
 
7
8
  export const RequestSchema = z.object({
8
9
  tokenName: z.string(),
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
 
4
4
  export namespace DeleteApiTokenCommand {
5
5
  export const url = REST_API.API_TOKENS.DELETE;
6
+ export const TSQ_url = url(':uuid');
6
7
 
7
8
  export const RequestSchema = z.object({
8
9
  uuid: z.string().uuid(),
@@ -4,6 +4,7 @@ import { ApiTokensSchema } from '../../models/api-tokens.schema';
4
4
 
5
5
  export namespace FindAllApiTokensCommand {
6
6
  export const url = REST_API.API_TOKENS.GET_ALL;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const ResponseSchema = z.object({
9
10
  response: z.array(ApiTokensSchema),
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { REST_API } from '../../api';
3
3
  export namespace LoginCommand {
4
4
  export const url = REST_API.AUTH.LOGIN;
5
+ export const TSQ_url = url;
5
6
 
6
7
  export const RequestSchema = z.object({
7
8
  username: z.string(),
@@ -6,6 +6,7 @@ import { HostsSchema } from '../../models';
6
6
 
7
7
  export namespace CreateHostCommand {
8
8
  export const url = REST_API.HOSTS.CREATE;
9
+ export const TSQ_url = url;
9
10
 
10
11
  export const RequestSchema = z.object({
11
12
  inboundUuid: z
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
 
4
4
  export namespace DeleteHostCommand {
5
5
  export const url = REST_API.HOSTS.DELETE;
6
+ export const TSQ_url = url(':uuid');
6
7
 
7
8
  export const RequestSchema = z.object({
8
9
  uuid: z.string().uuid(),
@@ -4,6 +4,7 @@ import { HostsSchema } from '../../models';
4
4
 
5
5
  export namespace GetAllHostsCommand {
6
6
  export const url = REST_API.HOSTS.GET_ALL;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const ResponseSchema = z.object({
9
10
  response: z.array(HostsSchema),
@@ -4,6 +4,7 @@ import { HostsSchema } from '../../models';
4
4
 
5
5
  export namespace ReorderHostCommand {
6
6
  export const url = REST_API.HOSTS.REORDER;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const RequestSchema = z.object({
9
10
  hosts: z.array(
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { REST_API } from '../../api';
3
- import { ALPN, ALPN_VALUES } from '../../constants/hosts/alpn';
4
- import { FINGERPRINTS, FINGERPRINTS_VALUES } from '../../constants/hosts/fingerprints';
3
+ import { ALPN_VALUES } from '../../constants/hosts/alpn';
4
+ import { FINGERPRINTS_VALUES } from '../../constants/hosts/fingerprints';
5
5
  import { HostsSchema } from '../../models';
6
6
 
7
7
  export namespace UpdateHostCommand {
8
8
  export const url = REST_API.HOSTS.UPDATE;
9
+ export const TSQ_url = url;
9
10
 
10
11
  export const RequestSchema = HostsSchema.pick({
11
12
  uuid: true,
@@ -4,6 +4,7 @@ import { InboundsSchema } from '../../models/inbounds.schema';
4
4
 
5
5
  export namespace GetInboundsCommand {
6
6
  export const url = REST_API.INBOUNDS.GET_INBOUNDS;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const ResponseSchema = z.object({
9
10
  response: z.array(InboundsSchema),
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
 
4
4
  export namespace GetPubKeyCommand {
5
5
  export const url = REST_API.KEYGEN.GET;
6
+ export const TSQ_url = url;
6
7
 
7
8
  export const ResponseSchema = z.object({
8
9
  response: z.object({
@@ -4,6 +4,7 @@ import { NodesSchema } from '../../models';
4
4
 
5
5
  export namespace CreateNodeCommand {
6
6
  export const url = REST_API.NODES.CREATE;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const RequestSchema = NodesSchema.pick({}).extend({
9
10
  name: z.string().min(5, 'Name is required'),
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
 
4
4
  export namespace DeleteNodeCommand {
5
5
  export const url = REST_API.NODES.DELETE;
6
+ export const TSQ_url = url(':uuid');
6
7
 
7
8
  export const RequestSchema = z.object({
8
9
  uuid: z.string().uuid(),
@@ -4,6 +4,7 @@ import { NodesSchema } from '../../models';
4
4
 
5
5
  export namespace DisableNodeCommand {
6
6
  export const url = REST_API.NODES.DISABLE;
7
+ export const TSQ_url = url(':uuid');
7
8
 
8
9
  export const RequestSchema = z.object({
9
10
  uuid: z.string().uuid(),
@@ -4,6 +4,7 @@ import { NodesSchema } from '../../models';
4
4
 
5
5
  export namespace EnableNodeCommand {
6
6
  export const url = REST_API.NODES.ENABLE;
7
+ export const TSQ_url = url(':uuid');
7
8
 
8
9
  export const RequestSchema = z.object({
9
10
  uuid: z.string().uuid(),
@@ -4,6 +4,7 @@ import { NodesSchema } from '../../models';
4
4
 
5
5
  export namespace GetAllNodesCommand {
6
6
  export const url = REST_API.NODES.GET_ALL;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const ResponseSchema = z.object({
9
10
  response: z.array(NodesSchema),
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { REST_API } from '../../api';
3
3
  export namespace RestartAllNodesCommand {
4
4
  export const url = REST_API.NODES.RESTART_ALL;
5
+ export const TSQ_url = url;
5
6
 
6
7
  export const ResponseSchema = z.object({
7
8
  response: z.object({
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
 
4
4
  export namespace RestartNodeCommand {
5
5
  export const url = REST_API.NODES.RESTART;
6
+ export const TSQ_url = url(':uuid');
6
7
 
7
8
  export const RequestSchema = z.object({
8
9
  uuid: z.string().uuid(),
@@ -4,6 +4,7 @@ import { NodesSchema } from '../../models';
4
4
 
5
5
  export namespace UpdateNodeCommand {
6
6
  export const url = REST_API.NODES.UPDATE;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const RequestSchema = NodesSchema.pick({
9
10
  uuid: true,
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
 
4
4
  export namespace GetSubscriptionByShortUuidCommand {
5
5
  export const url = REST_API.SUBSCRIPTION.GET;
6
+ export const TSQ_url = url(':shortUuid');
6
7
 
7
8
  export const RequestSchema = z.object({
8
9
  shortUuid: z.string(),
@@ -4,6 +4,7 @@ import { USERS_STATUS_VALUES } from '../../constants';
4
4
 
5
5
  export namespace GetSubscriptionInfoByShortUuidCommand {
6
6
  export const url = REST_API.SUBSCRIPTION.GET_INFO;
7
+ export const TSQ_url = url(':shortUuid');
7
8
 
8
9
  export const RequestSchema = z.object({
9
10
  shortUuid: z.string(),
@@ -4,6 +4,7 @@ import { BaseStatSchema } from '../../models/base-stat.schema';
4
4
 
5
5
  export namespace GetBandwidthStatsCommand {
6
6
  export const url = REST_API.SYSTEM.BANDWIDTH;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const RequestQuerySchema = z.object({
9
10
  tz: z.string().optional(),
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
 
4
4
  export namespace GetNodesStatisticsCommand {
5
5
  export const url = REST_API.SYSTEM.NODES_STATISTIC;
6
+ export const TSQ_url = url;
6
7
 
7
8
  export const RequestQuerySchema = z.object({
8
9
  tz: z.string().optional(),
@@ -4,6 +4,7 @@ import { USERS_STATUS } from '../../constants';
4
4
 
5
5
  export namespace GetStatsCommand {
6
6
  export const url = REST_API.SYSTEM.STATS;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const RequestQuerySchema = z.object({
9
10
  tz: z.string().optional(),
@@ -1,12 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  import { REST_API } from '../../api';
3
3
  import { RESET_PERIODS, USERS_STATUS } from '../../constants';
4
- import { InboundsSchema, UsersSchema } from '../../models';
4
+ import { UsersSchema } from '../../models';
5
5
 
6
6
  export namespace CreateUserCommand {
7
7
  export const url = REST_API.USERS.CREATE;
8
+ export const TSQ_url = url;
8
9
 
9
- export const RequestSchema = UsersSchema.pick({}).extend({
10
+ export const RequestSchema = z.object({
10
11
  username: z
11
12
  .string({
12
13
  required_error: 'Username is required',
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { REST_API } from '../../api';
3
3
  export namespace DeleteUserCommand {
4
4
  export const url = REST_API.USERS.DELETE_USER;
5
+ export const TSQ_url = url(':uuid');
5
6
 
6
7
  export const RequestSchema = z.object({
7
8
  uuid: z.string().uuid(),
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
  import { UsersSchema } from '../../models/users.schema';
4
4
  export namespace DisableUserCommand {
5
5
  export const url = REST_API.USERS.DISABLE_USER;
6
+ export const TSQ_url = url(':uuid');
6
7
 
7
8
  export const RequestSchema = z.object({
8
9
  uuid: z.string().uuid(),
@@ -4,6 +4,7 @@ import { UsersSchema } from '../../models/users.schema';
4
4
 
5
5
  export namespace EnableUserCommand {
6
6
  export const url = REST_API.USERS.ENABLE_USER;
7
+ export const TSQ_url = url(':uuid');
7
8
 
8
9
  export const RequestSchema = z.object({
9
10
  uuid: z.string().uuid(),
@@ -4,6 +4,7 @@ import { UsersSchema } from '../../models/users.schema';
4
4
 
5
5
  export namespace GetAllUsersV2Command {
6
6
  export const url = REST_API.USERS.GET_ALL_V2;
7
+ export const TSQ_url = url;
7
8
 
8
9
  const FilterSchema = z.object({
9
10
  id: z.string(),
@@ -4,6 +4,7 @@ import { UsersSchema } from '../../models/users.schema';
4
4
 
5
5
  export namespace GetAllUsersCommand {
6
6
  export const url = REST_API.USERS.GET_ALL;
7
+ export const TSQ_url = url;
7
8
 
8
9
  export const SortableFields = [
9
10
  'username',
@@ -4,6 +4,7 @@ import { UsersSchema } from '../../models/users.schema';
4
4
 
5
5
  export namespace GetUserByShortUuidCommand {
6
6
  export const url = REST_API.USERS.GET_BY_SHORT_UUID;
7
+ export const TSQ_url = url(':shortUuid');
7
8
 
8
9
  export const RequestSchema = z.object({
9
10
  shortUuid: z.string(),
@@ -4,6 +4,7 @@ import { UsersSchema } from '../../models/users.schema';
4
4
 
5
5
  export namespace GetUserBySubscriptionUuidCommand {
6
6
  export const url = REST_API.USERS.GET_BY_SUBSCRIPTION_UUID;
7
+ export const TSQ_url = url(':subscriptionUuid');
7
8
 
8
9
  export const RequestSchema = z.object({
9
10
  subscriptionUuid: z.string(),
@@ -4,6 +4,7 @@ import { UsersSchema } from '../../models/users.schema';
4
4
 
5
5
  export namespace GetUserByUuidCommand {
6
6
  export const url = REST_API.USERS.GET_BY_UUID;
7
+ export const TSQ_url = url(':uuid');
7
8
 
8
9
  export const RequestSchema = z.object({
9
10
  uuid: z.string().uuid(),
@@ -4,6 +4,7 @@ import { UsersSchema } from '../../models/users.schema';
4
4
 
5
5
  export namespace RevokeUserSubscriptionCommand {
6
6
  export const url = REST_API.USERS.REVOKE_SUBSCRIPTION;
7
+ export const TSQ_url = url(':uuid');
7
8
 
8
9
  export const RequestSchema = z.object({
9
10
  uuid: z.string().uuid(),
@@ -5,6 +5,7 @@ import { InboundsSchema, UsersSchema } from '../../models';
5
5
 
6
6
  export namespace UpdateUserCommand {
7
7
  export const url = REST_API.USERS.UPDATE;
8
+ export const TSQ_url = url;
8
9
 
9
10
  export const RequestSchema = UsersSchema.pick({
10
11
  uuid: true,
@@ -2,6 +2,8 @@ import { z } from 'zod';
2
2
  import { REST_API } from '../../api';
3
3
  export namespace GetXrayConfigCommand {
4
4
  export const url = REST_API.XRAY.GET_CONFIG;
5
+ export const TSQ_url = url;
6
+
5
7
  export const ResponseSchema = z.object({
6
8
  response: z.object({
7
9
  config: z.record(z.any()),
@@ -3,6 +3,7 @@ import { REST_API } from '../../api';
3
3
 
4
4
  export namespace UpdateXrayConfigCommand {
5
5
  export const url = REST_API.XRAY.UPDATE_CONFIG;
6
+ export const TSQ_url = url;
6
7
 
7
8
  export const RequestSchema = z.record(z.any());
8
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "A contract library for Remnawave",
5
5
  "main": "index.js",
6
6
  "scripts": {