@remnawave/xtls-sdk 0.6.3 → 0.8.0

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 (100) hide show
  1. package/build/index.d.ts +1 -1
  2. package/build/index.d.ts.map +1 -1
  3. package/build/index.js +1 -1
  4. package/build/src/common/utils/decode-user/constants/account-types.d.ts +2 -2
  5. package/build/src/common/utils/decode-user/constants/account-types.d.ts.map +1 -1
  6. package/build/src/common/utils/decode-user/constants/account-types.js +9 -7
  7. package/build/src/common/utils/decode-user/decode-user.d.ts.map +1 -1
  8. package/build/src/common/utils/decode-user/decode-user.js +1 -2
  9. package/build/src/handler/handler.service.d.ts +2 -3
  10. package/build/src/handler/handler.service.d.ts.map +1 -1
  11. package/build/src/handler/handler.service.js +17 -18
  12. package/build/src/handler/models/get-inbound-users/get-inbound-users.response.model.d.ts.map +1 -1
  13. package/build/src/router/models/index.d.ts +1 -0
  14. package/build/src/router/models/index.d.ts.map +1 -1
  15. package/build/src/router/models/index.js +1 -0
  16. package/build/src/router/router.service.d.ts +2 -3
  17. package/build/src/router/router.service.d.ts.map +1 -1
  18. package/build/src/router/router.service.js +3 -4
  19. package/build/src/stats/stats.service.d.ts +1 -1
  20. package/build/src/stats/stats.service.d.ts.map +1 -1
  21. package/build/src/stats/stats.service.js +1 -1
  22. package/build/src/xray-protos/app/commander/config.js +3 -3
  23. package/build/src/xray-protos/app/dispatcher/config.js +3 -3
  24. package/build/src/xray-protos/app/log/command/config.d.ts +1 -1
  25. package/build/src/xray-protos/app/log/command/config.d.ts.map +1 -1
  26. package/build/src/xray-protos/app/log/command/config.js +4 -4
  27. package/build/src/xray-protos/app/log/config.js +2 -2
  28. package/build/src/xray-protos/app/metrics/config.js +2 -2
  29. package/build/src/xray-protos/app/policy/config.js +10 -10
  30. package/build/src/xray-protos/app/proxyman/command/command.d.ts +1 -1
  31. package/build/src/xray-protos/app/proxyman/command/command.d.ts.map +1 -1
  32. package/build/src/xray-protos/app/proxyman/command/command.js +23 -23
  33. package/build/src/xray-protos/app/proxyman/config.d.ts +0 -37
  34. package/build/src/xray-protos/app/proxyman/config.d.ts.map +1 -1
  35. package/build/src/xray-protos/app/proxyman/config.js +16 -284
  36. package/build/src/xray-protos/app/reverse/config.js +5 -5
  37. package/build/src/xray-protos/app/router/command/command.d.ts +1 -1
  38. package/build/src/xray-protos/app/router/command/command.d.ts.map +1 -1
  39. package/build/src/xray-protos/app/router/command/command.js +17 -17
  40. package/build/src/xray-protos/app/router/config.d.ts +0 -2
  41. package/build/src/xray-protos/app/router/config.d.ts.map +1 -1
  42. package/build/src/xray-protos/app/router/config.js +14 -21
  43. package/build/src/xray-protos/app/stats/command/command.d.ts +1 -1
  44. package/build/src/xray-protos/app/stats/command/command.d.ts.map +1 -1
  45. package/build/src/xray-protos/app/stats/command/command.js +11 -11
  46. package/build/src/xray-protos/app/stats/config.js +3 -3
  47. package/build/src/xray-protos/app/version/config.js +2 -2
  48. package/build/src/xray-protos/common/log/log.js +1 -1
  49. package/build/src/xray-protos/common/net/address.js +2 -2
  50. package/build/src/xray-protos/common/net/destination.js +2 -2
  51. package/build/src/xray-protos/common/net/network.js +2 -2
  52. package/build/src/xray-protos/common/net/port.js +3 -3
  53. package/build/src/xray-protos/common/protocol/headers.js +2 -2
  54. package/build/src/xray-protos/common/protocol/server_spec.d.ts +1 -1
  55. package/build/src/xray-protos/common/protocol/server_spec.d.ts.map +1 -1
  56. package/build/src/xray-protos/common/protocol/server_spec.js +10 -10
  57. package/build/src/xray-protos/common/protocol/user.js +2 -2
  58. package/build/src/xray-protos/common/serial/typed_message.js +2 -2
  59. package/build/src/xray-protos/core/config.js +4 -4
  60. package/build/src/xray-protos/proxy/blackhole/config.js +4 -4
  61. package/build/src/xray-protos/proxy/dns/config.js +2 -2
  62. package/build/src/xray-protos/proxy/dokodemo/config.js +3 -3
  63. package/build/src/xray-protos/proxy/freedom/config.js +5 -5
  64. package/build/src/xray-protos/proxy/http/config.d.ts +1 -1
  65. package/build/src/xray-protos/proxy/http/config.d.ts.map +1 -1
  66. package/build/src/xray-protos/proxy/http/config.js +16 -14
  67. package/build/src/xray-protos/proxy/loopback/config.js +2 -2
  68. package/build/src/xray-protos/proxy/shadowsocks/config.d.ts +1 -1
  69. package/build/src/xray-protos/proxy/shadowsocks/config.d.ts.map +1 -1
  70. package/build/src/xray-protos/proxy/shadowsocks/config.js +14 -12
  71. package/build/src/xray-protos/proxy/shadowsocks_2022/config.js +7 -7
  72. package/build/src/xray-protos/proxy/socks/config.d.ts +1 -1
  73. package/build/src/xray-protos/proxy/socks/config.d.ts.map +1 -1
  74. package/build/src/xray-protos/proxy/socks/config.js +15 -13
  75. package/build/src/xray-protos/proxy/trojan/config.d.ts +1 -1
  76. package/build/src/xray-protos/proxy/trojan/config.d.ts.map +1 -1
  77. package/build/src/xray-protos/proxy/trojan/config.js +15 -13
  78. package/build/src/xray-protos/proxy/vless/account.d.ts +2 -0
  79. package/build/src/xray-protos/proxy/vless/account.d.ts.map +1 -1
  80. package/build/src/xray-protos/proxy/vless/account.js +44 -3
  81. package/build/src/xray-protos/proxy/vless/encoding/addons.js +2 -2
  82. package/build/src/xray-protos/proxy/vless/inbound/config.js +3 -3
  83. package/build/src/xray-protos/proxy/vless/outbound/config.d.ts +1 -1
  84. package/build/src/xray-protos/proxy/vless/outbound/config.d.ts.map +1 -1
  85. package/build/src/xray-protos/proxy/vless/outbound/config.js +15 -13
  86. package/build/src/xray-protos/proxy/vmess/account.js +2 -2
  87. package/build/src/xray-protos/proxy/vmess/inbound/config.d.ts +0 -2
  88. package/build/src/xray-protos/proxy/vmess/inbound/config.d.ts.map +1 -1
  89. package/build/src/xray-protos/proxy/vmess/inbound/config.js +5 -22
  90. package/build/src/xray-protos/proxy/vmess/outbound/config.d.ts +1 -1
  91. package/build/src/xray-protos/proxy/vmess/outbound/config.d.ts.map +1 -1
  92. package/build/src/xray-protos/proxy/vmess/outbound/config.js +15 -12
  93. package/build/src/xray-protos/proxy/wireguard/config.js +3 -3
  94. package/build/src/xray-protos/transport/internet/config.d.ts +1 -0
  95. package/build/src/xray-protos/transport/internet/config.d.ts.map +1 -1
  96. package/build/src/xray-protos/transport/internet/config.js +25 -7
  97. package/build/src/xray-protos/typeRegistry.d.ts +1 -1
  98. package/build/src/xray-protos/typeRegistry.d.ts.map +1 -1
  99. package/build/src/xray-protos/typeRegistry.js +1 -1
  100. package/package.json +22 -14
package/build/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Channel, ChannelOptions } from 'nice-grpc';
2
- import { StatsService } from './src/stats/stats.service';
3
2
  import { HandlerService } from './src/handler/handler.service';
4
3
  import { RouterService } from './src/router/router.service';
4
+ import { StatsService } from './src/stats/stats.service';
5
5
  export declare class XtlsApi {
6
6
  readonly channel: Channel;
7
7
  readonly stats: StatsService;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,OAAO;IAChB,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,SAAgB,KAAK,EAAE,YAAY,CAAC;IACpC,SAAgB,OAAO,EAAE,cAAc,CAAC;IACxC,SAAgB,MAAM,EAAE,aAAa,CAAC;gBAC1B,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;CASjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,qBAAa,OAAO;IAChB,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,SAAgB,KAAK,EAAE,YAAY,CAAC;IACpC,SAAgB,OAAO,EAAE,cAAc,CAAC;IACxC,SAAgB,MAAM,EAAE,aAAa,CAAC;gBAC1B,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc;CASjE"}
package/build/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.XtlsApi = void 0;
4
4
  const nice_grpc_1 = require("nice-grpc");
5
- const stats_service_1 = require("./src/stats/stats.service");
6
5
  const handler_service_1 = require("./src/handler/handler.service");
7
6
  const router_service_1 = require("./src/router/router.service");
7
+ const stats_service_1 = require("./src/stats/stats.service");
8
8
  class XtlsApi {
9
9
  constructor(ip, port, options) {
10
10
  this.channel = (0, nice_grpc_1.createChannel)(`${ip}:${port}`, undefined, {
@@ -1,7 +1,7 @@
1
+ import { Account as Shadowsocks2022Account } from '../../../../xray-protos/proxy/shadowsocks_2022/config';
2
+ import { Account as ShadowsocksAccount } from '../../../../xray-protos/proxy/shadowsocks/config';
1
3
  import { Account as TrojanAccount } from '../../../../xray-protos/proxy/trojan/config';
2
4
  import { Account as VlessAccount } from '../../../../xray-protos/proxy/vless/account';
3
- import { Account as ShadowsocksAccount } from '../../../../xray-protos/proxy/shadowsocks/config';
4
- import { Account as Shadowsocks2022Account } from '../../../../xray-protos/proxy/shadowsocks_2022/config';
5
5
  import { Account as SocksAccount } from '../../../../xray-protos/proxy/socks/config';
6
6
  import { Account as HttpAccount } from '../../../../xray-protos/proxy/http/config';
7
7
  export declare const ACCOUNT_TYPES: {
@@ -1 +1 @@
1
- {"version":3,"file":"account-types.d.ts","sourceRoot":"","sources":["../../../../../../src/common/utils/decode-user/constants/account-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAC1G,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAEnF,eAAO,MAAM,aAAa;;;;uCAII,aAAa,KAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC;;;;;uCAO5C,YAAY,KAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;;;;;uCAa1C,kBAAkB,KAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;;;;;uCAStD,sBAAsB,KAAG,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC;;;;;uCAO9D,YAAY,KAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;;;;;uCAQ1C,WAAW,KAAG,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;;CAK5D,CAAC"}
1
+ {"version":3,"file":"account-types.d.ts","sourceRoot":"","sources":["../../../../../../src/common/utils/decode-user/constants/account-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAC1G,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAEnF,eAAO,MAAM,aAAa;;;;uCAII,aAAa,KAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC;;;;;uCAO5C,YAAY,KAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;;;;;uCAe1C,kBAAkB,KAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;;;;;uCAStD,sBAAsB,KAAG,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC;;;;;uCAO9D,YAAY,KAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;;;;;uCAQ1C,WAAW,KAAG,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;;CAK5D,CAAC"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ACCOUNT_TYPES = void 0;
4
- const config_1 = require("../../../../xray-protos/proxy/trojan/config");
5
- const account_1 = require("../../../../xray-protos/proxy/vless/account");
4
+ const config_1 = require("../../../../xray-protos/proxy/shadowsocks_2022/config");
6
5
  const config_2 = require("../../../../xray-protos/proxy/shadowsocks/config");
7
- const config_3 = require("../../../../xray-protos/proxy/shadowsocks_2022/config");
6
+ const config_3 = require("../../../../xray-protos/proxy/trojan/config");
7
+ const account_1 = require("../../../../xray-protos/proxy/vless/account");
8
8
  const config_4 = require("../../../../xray-protos/proxy/socks/config");
9
9
  const config_5 = require("../../../../xray-protos/proxy/http/config");
10
10
  exports.ACCOUNT_TYPES = {
11
- [config_1.Account.$type]: {
12
- decoder: config_1.Account,
11
+ [config_3.Account.$type]: {
12
+ decoder: config_3.Account,
13
13
  protocol: 'trojan',
14
14
  getCredentials: (acc) => ({
15
15
  password: acc.password,
@@ -26,6 +26,8 @@ exports.ACCOUNT_TYPES = {
26
26
  seconds: acc.seconds,
27
27
  padding: acc.padding,
28
28
  reverse: acc.reverse,
29
+ testpre: acc.testpre,
30
+ testseed: acc.testseed,
29
31
  }),
30
32
  },
31
33
  [config_2.Account.$type]: {
@@ -37,8 +39,8 @@ exports.ACCOUNT_TYPES = {
37
39
  ivCheck: acc.ivCheck,
38
40
  }),
39
41
  },
40
- [config_3.Account.$type]: {
41
- decoder: config_3.Account,
42
+ [config_1.Account.$type]: {
43
+ decoder: config_1.Account,
42
44
  protocol: 'shadowsocks2022',
43
45
  getCredentials: (acc) => ({
44
46
  key: acc.key,
@@ -1 +1 @@
1
- {"version":3,"file":"decode-user.d.ts","sourceRoot":"","sources":["../../../../../src/common/utils/decode-user/decode-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,2CAA2C,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,KAAG,WAoBvC,CAAC"}
1
+ {"version":3,"file":"decode-user.d.ts","sourceRoot":"","sources":["../../../../../src/common/utils/decode-user/decode-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,2CAA2C,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,KAAG,WAmBvC,CAAC"}
@@ -44,8 +44,7 @@ const decodeUser = (user) => {
44
44
  if (!accountConfig) {
45
45
  throw new Error(`Unknown account type: ${accountType}`);
46
46
  }
47
- const accountBuffer = Buffer.from(user.account.value);
48
- const decodedAccount = accountConfig.decoder.decode(accountBuffer);
47
+ const decodedAccount = accountConfig.decoder.decode(user.account.value);
49
48
  return {
50
49
  [accountConfig.protocol]: accountConfig.getCredentials(decodedAccount),
51
50
  protocol: accountConfig.protocol,
@@ -1,9 +1,8 @@
1
1
  import { Channel } from 'nice-grpc';
2
2
  import { HandlerServiceClient } from '../xray-protos/app/proxyman/command/command';
3
- import { ISdkResponse } from '../common/types/sdk-response';
4
- import { AddUserResponseModel, GetInboundUsersResponseModel } from './models';
5
3
  import { IAddHttpUser, IAddShadowsocks2022User, IAddShadowsocksUser, IAddSocksUser, IAddTrojanUser, IAddVlessUser } from './interfaces';
6
- import { RemoveUserResponseModel } from './models/remove-user/remove-user.response.model';
4
+ import { AddUserResponseModel, GetInboundUsersResponseModel, RemoveUserResponseModel } from './models';
5
+ import { ISdkResponse } from '../common/types/sdk-response';
7
6
  /**
8
7
  * Service for managing Xray inbound handlers and their users
9
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"handler.service.d.ts","sourceRoot":"","sources":["../../../src/handler/handler.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,OAAO,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAEH,oBAAoB,EAGvB,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EACH,YAAY,EACZ,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,aAAa,EAChB,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAE1F;;GAEG;AACH,qBAAa,cAAc;IAGX,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;gBAEjB,OAAO,EAAE,OAAO;IAI7C;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC;IAoB9F;;;;;;;OAOG;IACU,aAAa,CAAC,IAAI,EAAE,cAAc,GAA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C,MAAM,CAAC,CAAC;IAmB7E;;;OAGG;IACH,IAAW,SAAS,IAAI,oBAAoB,CAE3C;CACJ"}
@@ -6,17 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.HandlerService = void 0;
7
7
  const nice_grpc_1 = require("nice-grpc");
8
8
  const command_1 = require("../xray-protos/app/proxyman/command/command");
9
- const user_1 = require("../xray-protos/common/protocol/user");
10
- const create_typed_message_1 = __importDefault(require("../common/utils/create-typed-message/create-typed-message"));
11
- const errors_1 = require("../common/errors");
12
9
  const models_1 = require("./models");
13
- const config_1 = require("../xray-protos/proxy/trojan/config");
14
- const account_1 = require("../xray-protos/proxy/vless/account");
10
+ const config_1 = require("../xray-protos/proxy/shadowsocks_2022/config");
11
+ const create_typed_message_1 = __importDefault(require("../common/utils/create-typed-message/create-typed-message"));
15
12
  const config_2 = require("../xray-protos/proxy/shadowsocks/config");
16
- const config_3 = require("../xray-protos/proxy/shadowsocks_2022/config");
13
+ const config_3 = require("../xray-protos/proxy/trojan/config");
14
+ const account_1 = require("../xray-protos/proxy/vless/account");
17
15
  const config_4 = require("../xray-protos/proxy/socks/config");
18
16
  const config_5 = require("../xray-protos/proxy/http/config");
19
- const remove_user_response_model_1 = require("./models/remove-user/remove-user.response.model");
17
+ const user_1 = require("../xray-protos/common/protocol/user");
18
+ const errors_1 = require("../common/errors");
20
19
  /**
21
20
  * Service for managing Xray inbound handlers and their users
22
21
  */
@@ -75,13 +74,13 @@ class HandlerService {
75
74
  */
76
75
  async addTrojanUser(data) {
77
76
  try {
78
- const response = await this.client.alterInbound({
77
+ await this.client.alterInbound({
79
78
  tag: data.tag,
80
79
  operation: (0, create_typed_message_1.default)(command_1.AddUserOperation, {
81
80
  user: user_1.User.create({
82
81
  email: data.username,
83
82
  level: data.level,
84
- account: (0, create_typed_message_1.default)(config_1.Account, {
83
+ account: (0, create_typed_message_1.default)(config_3.Account, {
85
84
  password: data.password,
86
85
  }),
87
86
  }),
@@ -119,7 +118,7 @@ class HandlerService {
119
118
  */
120
119
  async addVlessUser(data) {
121
120
  try {
122
- const response = await this.client.alterInbound({
121
+ await this.client.alterInbound({
123
122
  tag: data.tag,
124
123
  operation: (0, create_typed_message_1.default)(command_1.AddUserOperation, {
125
124
  user: user_1.User.create({
@@ -165,7 +164,7 @@ class HandlerService {
165
164
  */
166
165
  async addShadowsocksUser(data) {
167
166
  try {
168
- const response = await this.client.alterInbound({
167
+ await this.client.alterInbound({
169
168
  tag: data.tag,
170
169
  operation: (0, create_typed_message_1.default)(command_1.AddUserOperation, {
171
170
  user: user_1.User.create({
@@ -211,13 +210,13 @@ class HandlerService {
211
210
  */
212
211
  async addShadowsocks2022User(data) {
213
212
  try {
214
- const response = await this.client.alterInbound({
213
+ await this.client.alterInbound({
215
214
  tag: data.tag,
216
215
  operation: (0, create_typed_message_1.default)(command_1.AddUserOperation, {
217
216
  user: user_1.User.create({
218
217
  email: data.username,
219
218
  level: data.level,
220
- account: (0, create_typed_message_1.default)(config_3.Account, {
219
+ account: (0, create_typed_message_1.default)(config_1.Account, {
221
220
  key: data.key,
222
221
  }),
223
222
  }),
@@ -255,7 +254,7 @@ class HandlerService {
255
254
  */
256
255
  async addSocksUser(data) {
257
256
  try {
258
- const response = await this.client.alterInbound({
257
+ await this.client.alterInbound({
259
258
  tag: data.tag,
260
259
  operation: (0, create_typed_message_1.default)(command_1.AddUserOperation, {
261
260
  user: user_1.User.create({
@@ -300,7 +299,7 @@ class HandlerService {
300
299
  */
301
300
  async addHttpUser(data) {
302
301
  try {
303
- const response = await this.client.alterInbound({
302
+ await this.client.alterInbound({
304
303
  tag: data.tag,
305
304
  operation: (0, create_typed_message_1.default)(command_1.AddUserOperation, {
306
305
  user: user_1.User.create({
@@ -346,13 +345,13 @@ class HandlerService {
346
345
  */
347
346
  async removeUser(tag, username) {
348
347
  try {
349
- const response = await this.client.alterInbound({
348
+ await this.client.alterInbound({
350
349
  tag: tag,
351
350
  operation: (0, create_typed_message_1.default)(command_1.RemoveUserOperation, { email: username }),
352
351
  });
353
352
  return {
354
353
  isOk: true,
355
- data: new remove_user_response_model_1.RemoveUserResponseModel(true),
354
+ data: new models_1.RemoveUserResponseModel(true),
356
355
  };
357
356
  }
358
357
  catch (error) {
@@ -363,7 +362,7 @@ class HandlerService {
363
362
  if (message.includes('not found')) {
364
363
  return {
365
364
  isOk: true,
366
- data: new remove_user_response_model_1.RemoveUserResponseModel(false),
365
+ data: new models_1.RemoveUserResponseModel(false),
367
366
  };
368
367
  }
369
368
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"get-inbound-users.response.model.d.ts","sourceRoot":"","sources":["../../../../../src/handler/models/get-inbound-users/get-inbound-users.response.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AACxF,OAAO,EAAE,IAAI,EAAE,MAAM,2CAA2C,CAAC;AAEjE,qBAAa,4BAA4B;IAC9B,KAAK,EAAE,WAAW,EAAE,CAAC;gBAEhB,KAAK,EAAE,IAAI,EAAE;CAG5B"}
1
+ {"version":3,"file":"get-inbound-users.response.model.d.ts","sourceRoot":"","sources":["../../../../../src/handler/models/get-inbound-users/get-inbound-users.response.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAExF,OAAO,EAAE,IAAI,EAAE,MAAM,2CAA2C,CAAC;AAEjE,qBAAa,4BAA4B;IAC9B,KAAK,EAAE,WAAW,EAAE,CAAC;gBAEhB,KAAK,EAAE,IAAI,EAAE;CAG5B"}
@@ -1,2 +1,3 @@
1
1
  export * from './add-source-ip-rule';
2
+ export * from './remove-rule-by-rule-tag';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/router/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/router/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC"}
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./add-source-ip-rule"), exports);
18
+ __exportStar(require("./remove-rule-by-rule-tag"), exports);
@@ -1,9 +1,8 @@
1
1
  import { Channel } from 'nice-grpc';
2
2
  import { RoutingServiceClient } from '../xray-protos/app/router/command/command';
3
- import { ISdkResponse } from '../common/types/sdk-response';
3
+ import { AddSourceIpRuleResponseModel, RemoveRuleByRuleTagResponseModel } from './models';
4
4
  import { IAddSourceIpRule, IRemoveRuleByRuleTag } from './interfaces';
5
- import { AddSourceIpRuleResponseModel } from './models';
6
- import { RemoveRuleByRuleTagResponseModel } from './models/remove-rule-by-rule-tag';
5
+ import { ISdkResponse } from '../common/types/sdk-response';
7
6
  /**
8
7
  * Service for managing routing rules in XRAY/XTLS
9
8
  * RoutingService is required (enable on XRay Config) to add/remove routing rules.
@@ -1 +1 @@
1
- {"version":3,"file":"router.service.d.ts","sourceRoot":"","sources":["../../../src/router/router.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,OAAO,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAEH,oBAAoB,EACvB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAGpF;;;GAGG;AACH,qBAAa,aAAa;IAOV,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAE9C;;;OAGG;gBAC0B,OAAO,EAAE,OAAO;IAI7C;;;;;;;;OAQG;IACU,YAAY,CACrB,GAAG,EAAE,gBAAgB,GACtB,OAAO,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC;IA2CtD;;;;;OAKG;IACU,mBAAmB,CAC5B,GAAG,EAAE,oBAAoB,GAC1B,OAAO,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;IAsB1D;;;OAGG;IACH,IAAW,SAAS,IAAI,oBAAoB,CAE3C;CACJ"}
1
+ {"version":3,"file":"router.service.d.ts","sourceRoot":"","sources":["../../../src/router/router.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,OAAO,EAAE,MAAM,WAAW,CAAC;AAGlD,OAAO,EAEH,oBAAoB,EACvB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,4BAA4B,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAE1F,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D;;;GAGG;AACH,qBAAa,aAAa;IAOV,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAE9C;;;OAGG;gBAC0B,OAAO,EAAE,OAAO;IAI7C;;;;;;;;OAQG;IACU,YAAY,CACrB,GAAG,EAAE,gBAAgB,GACtB,OAAO,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC;IA2CtD;;;;;OAKG;IACU,mBAAmB,CAC5B,GAAG,EAAE,oBAAoB,GAC1B,OAAO,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;IAsB1D;;;OAGG;IACH,IAAW,SAAS,IAAI,oBAAoB,CAE3C;CACJ"}
@@ -5,13 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.RouterService = void 0;
7
7
  const nice_grpc_1 = require("nice-grpc");
8
+ const ipaddr_js_1 = __importDefault(require("ipaddr.js"));
8
9
  const command_1 = require("../xray-protos/app/router/command/command");
9
10
  const create_typed_message_1 = __importDefault(require("../common/utils/create-typed-message/create-typed-message"));
10
- const config_1 = require("../xray-protos/app/router/config");
11
11
  const models_1 = require("./models");
12
+ const config_1 = require("../xray-protos/app/router/config");
12
13
  const router_errors_1 = require("../common/errors/router/router.errors");
13
- const remove_rule_by_rule_tag_1 = require("./models/remove-rule-by-rule-tag");
14
- const ipaddr_js_1 = __importDefault(require("ipaddr.js"));
15
14
  /**
16
15
  * Service for managing routing rules in XRAY/XTLS
17
16
  * RoutingService is required (enable on XRay Config) to add/remove routing rules.
@@ -88,7 +87,7 @@ class RouterService {
88
87
  });
89
88
  return {
90
89
  isOk: true,
91
- data: new remove_rule_by_rule_tag_1.RemoveRuleByRuleTagResponseModel(true),
90
+ data: new models_1.RemoveRuleByRuleTagResponseModel(true),
92
91
  };
93
92
  }
94
93
  catch (error) {
@@ -1,7 +1,7 @@
1
1
  import { Channel } from 'nice-grpc';
2
+ import { GetAllUsersStatsResponseModel, GetUserStatsResponseModel, GetSysStatsResponseModel, GetUserOnlineStatusResponseModel, GetAllInboundsStatsResponseModel, GetInboundStatsResponseModel, GetAllOutboundsStatsResponseModel, GetOutboundStatsResponseModel } from './models';
2
3
  import { StatsServiceClient } from '../xray-protos/app/stats/command/command';
3
4
  import { ISdkResponse } from '../common/types';
4
- import { GetAllUsersStatsResponseModel, GetUserStatsResponseModel, GetSysStatsResponseModel, GetUserOnlineStatusResponseModel, GetAllInboundsStatsResponseModel, GetInboundStatsResponseModel, GetAllOutboundsStatsResponseModel, GetOutboundStatsResponseModel } from './models';
5
5
  /**
6
6
  * Service class for interacting with Xray server statistics.
7
7
  * Provides methods to retrieve system and user statistics.
@@ -1 +1 @@
1
- {"version":3,"file":"stats.service.d.ts","sourceRoot":"","sources":["../../../src/stats/stats.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM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CACrB,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,yBAAyB,CAAC,CAAC;IAuBnD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACU,mBAAmB,CAC5B,QAAQ,EAAE,MAAM,GACjB,OAAO,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;IA8B1D;;;;;;;;;;;;;;;;;;;OAmBG;IACU,mBAAmB,CAC5B,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;IAuB1D;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,eAAe,CACxB,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC;IAuBtD;;;;;;;;;;;;;;;;;;;OAmBG;IACU,oBAAoB,CAC7B,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,iCAAiC,CAAC,CAAC;IAuB3D;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,gBAAgB,CACzB,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,6BAA6B,CAAC,CAAC;IAuBvD;;;OAGG;IACH,IAAW,SAAS,IAAI,kBAAkB,CAEzC;CACJ"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StatsService = void 0;
4
4
  const nice_grpc_1 = require("nice-grpc");
5
+ const models_1 = require("./models");
5
6
  const command_1 = require("../xray-protos/app/stats/command/command");
6
7
  const errors_1 = require("../common/errors");
7
- const models_1 = require("./models");
8
8
  /**
9
9
  * Service class for interacting with Xray server statistics.
10
10
  * Provides methods to retrieve system and user statistics.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.2.7
4
+ // protoc-gen-ts_proto v2.8.3
5
5
  // protoc v5.29.3
6
6
  // source: app/commander/config.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -30,7 +30,7 @@ exports.Config = {
30
30
  },
31
31
  decode(input, length) {
32
32
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
33
- let end = length === undefined ? reader.len : reader.pos + length;
33
+ const end = length === undefined ? reader.len : reader.pos + length;
34
34
  const message = createBaseConfig();
35
35
  while (reader.pos < end) {
36
36
  const tag = reader.uint32();
@@ -109,7 +109,7 @@ exports.ReflectionConfig = {
109
109
  },
110
110
  decode(input, length) {
111
111
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
112
- let end = length === undefined ? reader.len : reader.pos + length;
112
+ const end = length === undefined ? reader.len : reader.pos + length;
113
113
  const message = createBaseReflectionConfig();
114
114
  while (reader.pos < end) {
115
115
  const tag = reader.uint32();
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.2.7
4
+ // protoc-gen-ts_proto v2.8.3
5
5
  // protoc v5.29.3
6
6
  // source: app/dispatcher/config.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -20,7 +20,7 @@ exports.SessionConfig = {
20
20
  },
21
21
  decode(input, length) {
22
22
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
23
- let end = length === undefined ? reader.len : reader.pos + length;
23
+ const end = length === undefined ? reader.len : reader.pos + length;
24
24
  const message = createBaseSessionConfig();
25
25
  while (reader.pos < end) {
26
26
  const tag = reader.uint32();
@@ -62,7 +62,7 @@ exports.Config = {
62
62
  },
63
63
  decode(input, length) {
64
64
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
65
- let end = length === undefined ? reader.len : reader.pos + length;
65
+ const end = length === undefined ? reader.len : reader.pos + length;
66
66
  const message = createBaseConfig();
67
67
  while (reader.pos < end) {
68
68
  const tag = reader.uint32();
@@ -1,5 +1,5 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- import { type CallContext, type CallOptions } from "nice-grpc-common";
2
+ import type { CallContext, CallOptions } from "nice-grpc-common";
3
3
  export declare const protobufPackage = "xray.app.log.command";
4
4
  export interface Config {
5
5
  $type: "xray.app.log.command.Config";
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../src/xray-protos/app/log/command/config.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGtE,eAAO,MAAM,eAAe,yBAAyB,CAAC;AAEtD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,6BAA6B,CAAC;CACtC;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,2CAA2C,CAAC;CACpD;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,4CAA4C,CAAC;CACrD;AAMD,eAAO,MAAM,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,6BAA6B,CAuCpE,CAAC;AAQF,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,oBAAoB,EAAE,2CAA2C,CAuC9G,CAAC;AAQF,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,EAAE,4CAA4C,CAuCjH,CAAC;AAIF,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAC;AACrE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;CAa1B,CAAC;AAEX,MAAM,WAAW,2BAA2B,CAAC,cAAc,GAAG,EAAE;IAC9D,aAAa,CACX,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,WAAW,GAAG,cAAc,GACpC,OAAO,CAAC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CAAC;CACxC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.2.7
4
+ // protoc-gen-ts_proto v2.8.3
5
5
  // protoc v5.29.3
6
6
  // source: app/log/command/config.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -20,7 +20,7 @@ exports.Config = {
20
20
  },
21
21
  decode(input, length) {
22
22
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
23
- let end = length === undefined ? reader.len : reader.pos + length;
23
+ const end = length === undefined ? reader.len : reader.pos + length;
24
24
  const message = createBaseConfig();
25
25
  while (reader.pos < end) {
26
26
  const tag = reader.uint32();
@@ -59,7 +59,7 @@ exports.RestartLoggerRequest = {
59
59
  },
60
60
  decode(input, length) {
61
61
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
62
- let end = length === undefined ? reader.len : reader.pos + length;
62
+ const end = length === undefined ? reader.len : reader.pos + length;
63
63
  const message = createBaseRestartLoggerRequest();
64
64
  while (reader.pos < end) {
65
65
  const tag = reader.uint32();
@@ -98,7 +98,7 @@ exports.RestartLoggerResponse = {
98
98
  },
99
99
  decode(input, length) {
100
100
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
101
- let end = length === undefined ? reader.len : reader.pos + length;
101
+ const end = length === undefined ? reader.len : reader.pos + length;
102
102
  const message = createBaseRestartLoggerResponse();
103
103
  while (reader.pos < end) {
104
104
  const tag = reader.uint32();
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.2.7
4
+ // protoc-gen-ts_proto v2.8.3
5
5
  // protoc v5.29.3
6
6
  // source: app/log/config.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -96,7 +96,7 @@ exports.Config = {
96
96
  },
97
97
  decode(input, length) {
98
98
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
99
- let end = length === undefined ? reader.len : reader.pos + length;
99
+ const end = length === undefined ? reader.len : reader.pos + length;
100
100
  const message = createBaseConfig();
101
101
  while (reader.pos < end) {
102
102
  const tag = reader.uint32();
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.2.7
4
+ // protoc-gen-ts_proto v2.8.3
5
5
  // protoc v5.29.3
6
6
  // source: app/metrics/config.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -26,7 +26,7 @@ exports.Config = {
26
26
  },
27
27
  decode(input, length) {
28
28
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
29
- let end = length === undefined ? reader.len : reader.pos + length;
29
+ const end = length === undefined ? reader.len : reader.pos + length;
30
30
  const message = createBaseConfig();
31
31
  while (reader.pos < end) {
32
32
  const tag = reader.uint32();
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.2.7
4
+ // protoc-gen-ts_proto v2.8.3
5
5
  // protoc v5.29.3
6
6
  // source: app/policy/config.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -23,7 +23,7 @@ exports.Second = {
23
23
  },
24
24
  decode(input, length) {
25
25
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
26
- let end = length === undefined ? reader.len : reader.pos + length;
26
+ const end = length === undefined ? reader.len : reader.pos + length;
27
27
  const message = createBaseSecond();
28
28
  while (reader.pos < end) {
29
29
  const tag = reader.uint32();
@@ -82,7 +82,7 @@ exports.Policy = {
82
82
  },
83
83
  decode(input, length) {
84
84
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
85
- let end = length === undefined ? reader.len : reader.pos + length;
85
+ const end = length === undefined ? reader.len : reader.pos + length;
86
86
  const message = createBasePolicy();
87
87
  while (reader.pos < end) {
88
88
  const tag = reader.uint32();
@@ -183,7 +183,7 @@ exports.Policy_Timeout = {
183
183
  },
184
184
  decode(input, length) {
185
185
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
186
- let end = length === undefined ? reader.len : reader.pos + length;
186
+ const end = length === undefined ? reader.len : reader.pos + length;
187
187
  const message = createBasePolicy_Timeout();
188
188
  while (reader.pos < end) {
189
189
  const tag = reader.uint32();
@@ -289,7 +289,7 @@ exports.Policy_Stats = {
289
289
  },
290
290
  decode(input, length) {
291
291
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
292
- let end = length === undefined ? reader.len : reader.pos + length;
292
+ const end = length === undefined ? reader.len : reader.pos + length;
293
293
  const message = createBasePolicy_Stats();
294
294
  while (reader.pos < end) {
295
295
  const tag = reader.uint32();
@@ -369,7 +369,7 @@ exports.Policy_Buffer = {
369
369
  },
370
370
  decode(input, length) {
371
371
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
372
- let end = length === undefined ? reader.len : reader.pos + length;
372
+ const end = length === undefined ? reader.len : reader.pos + length;
373
373
  const message = createBasePolicy_Buffer();
374
374
  while (reader.pos < end) {
375
375
  const tag = reader.uint32();
@@ -425,7 +425,7 @@ exports.SystemPolicy = {
425
425
  },
426
426
  decode(input, length) {
427
427
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
428
- let end = length === undefined ? reader.len : reader.pos + length;
428
+ const end = length === undefined ? reader.len : reader.pos + length;
429
429
  const message = createBaseSystemPolicy();
430
430
  while (reader.pos < end) {
431
431
  const tag = reader.uint32();
@@ -498,7 +498,7 @@ exports.SystemPolicy_Stats = {
498
498
  },
499
499
  decode(input, length) {
500
500
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
501
- let end = length === undefined ? reader.len : reader.pos + length;
501
+ const end = length === undefined ? reader.len : reader.pos + length;
502
502
  const message = createBaseSystemPolicy_Stats();
503
503
  while (reader.pos < end) {
504
504
  const tag = reader.uint32();
@@ -593,7 +593,7 @@ exports.Config = {
593
593
  },
594
594
  decode(input, length) {
595
595
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
596
- let end = length === undefined ? reader.len : reader.pos + length;
596
+ const end = length === undefined ? reader.len : reader.pos + length;
597
597
  const message = createBaseConfig();
598
598
  while (reader.pos < end) {
599
599
  const tag = reader.uint32();
@@ -685,7 +685,7 @@ exports.Config_LevelEntry = {
685
685
  },
686
686
  decode(input, length) {
687
687
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
688
- let end = length === undefined ? reader.len : reader.pos + length;
688
+ const end = length === undefined ? reader.len : reader.pos + length;
689
689
  const message = createBaseConfig_LevelEntry();
690
690
  while (reader.pos < end) {
691
691
  const tag = reader.uint32();
@@ -1,5 +1,5 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- import { type CallContext, type CallOptions } from "nice-grpc-common";
2
+ import type { CallContext, CallOptions } from "nice-grpc-common";
3
3
  import { User } from "../../../common/protocol/user";
4
4
  import { TypedMessage } from "../../../common/serial/typed_message";
5
5
  import { InboundHandlerConfig, OutboundHandlerConfig } from "../../../core/config";