@remnawave/backend-contract 2.9.13 → 2.9.20

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 (275) hide show
  1. package/build/backend/api/controllers/bandwidth-stats.d.ts +7 -8
  2. package/build/backend/api/controllers/bandwidth-stats.d.ts.map +1 -1
  3. package/build/backend/api/controllers/bandwidth-stats.js +8 -20
  4. package/build/backend/api/controllers/connections.d.ts +1 -1
  5. package/build/backend/api/controllers/connections.d.ts.map +1 -1
  6. package/build/backend/api/controllers/connections.js +1 -1
  7. package/build/backend/api/controllers/hwid.d.ts +1 -1
  8. package/build/backend/api/controllers/hwid.d.ts.map +1 -1
  9. package/build/backend/api/controllers/hwid.js +1 -1
  10. package/build/backend/api/controllers/internal-squads.d.ts +2 -0
  11. package/build/backend/api/controllers/internal-squads.d.ts.map +1 -1
  12. package/build/backend/api/controllers/internal-squads.js +2 -0
  13. package/build/backend/api/controllers/metadata.d.ts +4 -4
  14. package/build/backend/api/controllers/metadata.d.ts.map +1 -1
  15. package/build/backend/api/controllers/metadata.js +4 -4
  16. package/build/backend/api/controllers/subscriptions.d.ts +2 -2
  17. package/build/backend/api/controllers/subscriptions.d.ts.map +1 -1
  18. package/build/backend/api/controllers/subscriptions.js +2 -2
  19. package/build/backend/api/controllers/system.d.ts +1 -0
  20. package/build/backend/api/controllers/system.d.ts.map +1 -1
  21. package/build/backend/api/controllers/system.js +1 -0
  22. package/build/backend/api/controllers/users.d.ts +8 -13
  23. package/build/backend/api/controllers/users.d.ts.map +1 -1
  24. package/build/backend/api/controllers/users.js +8 -13
  25. package/build/backend/api/controllers-info.d.ts +15 -15
  26. package/build/backend/api/controllers-info.js +15 -15
  27. package/build/backend/api/routes.d.ts +22 -23
  28. package/build/backend/api/routes.d.ts.map +1 -1
  29. package/build/backend/api/routes.js +22 -23
  30. package/build/backend/commands/bandwidth-stats/index.d.ts +1 -1
  31. package/build/backend/commands/bandwidth-stats/index.d.ts.map +1 -1
  32. package/build/backend/commands/bandwidth-stats/index.js +1 -1
  33. package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.d.ts +31 -0
  34. package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.d.ts.map +1 -0
  35. package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.js +50 -0
  36. package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-user-usage.command.d.ts +29 -0
  37. package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-user-usage.command.d.ts.map +1 -0
  38. package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-user-usage.command.js +34 -0
  39. package/build/backend/commands/bandwidth-stats/internal-squads/index.d.ts +3 -0
  40. package/build/backend/commands/bandwidth-stats/internal-squads/index.d.ts.map +1 -0
  41. package/build/backend/commands/bandwidth-stats/{legacy → internal-squads}/index.js +2 -2
  42. package/build/backend/commands/bandwidth-stats/nodes/get-node-usage.command.d.ts +29 -0
  43. package/build/backend/commands/bandwidth-stats/nodes/get-node-usage.command.d.ts.map +1 -0
  44. package/build/backend/commands/bandwidth-stats/nodes/get-node-usage.command.js +38 -0
  45. package/build/backend/commands/bandwidth-stats/nodes/index.d.ts +1 -0
  46. package/build/backend/commands/bandwidth-stats/nodes/index.d.ts.map +1 -1
  47. package/build/backend/commands/bandwidth-stats/nodes/index.js +1 -0
  48. package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.d.ts +2 -2
  49. package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.d.ts.map +1 -1
  50. package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.js +5 -4
  51. package/build/backend/commands/connections/connections-by-node-result.command.d.ts +1 -1
  52. package/build/backend/commands/connections/connections-by-node-result.command.js +1 -1
  53. package/build/backend/commands/connections/connections-by-user-result.command.d.ts +1 -2
  54. package/build/backend/commands/connections/connections-by-user-result.command.d.ts.map +1 -1
  55. package/build/backend/commands/connections/connections-by-user-result.command.js +1 -2
  56. package/build/backend/commands/connections/connections-by-user.command.d.ts +2 -2
  57. package/build/backend/commands/connections/connections-by-user.command.d.ts.map +1 -1
  58. package/build/backend/commands/connections/connections-by-user.command.js +4 -3
  59. package/build/backend/commands/connections/drop-connections.command.d.ts +4 -4
  60. package/build/backend/commands/connections/drop-connections.command.js +3 -3
  61. package/build/backend/commands/hwid/create-user-hwid-device.command.d.ts +1 -1
  62. package/build/backend/commands/hwid/create-user-hwid-device.command.js +2 -2
  63. package/build/backend/commands/hwid/delete-all-user-hwid-devices.command.d.ts +1 -1
  64. package/build/backend/commands/hwid/delete-all-user-hwid-devices.command.js +1 -1
  65. package/build/backend/commands/hwid/delete-user-hwid-device.command.d.ts +1 -1
  66. package/build/backend/commands/hwid/delete-user-hwid-device.command.js +1 -1
  67. package/build/backend/commands/hwid/get-top-users-by-hwid-devices.command.d.ts +0 -1
  68. package/build/backend/commands/hwid/get-top-users-by-hwid-devices.command.d.ts.map +1 -1
  69. package/build/backend/commands/hwid/get-top-users-by-hwid-devices.command.js +0 -1
  70. package/build/backend/commands/hwid/get-user-hwid-devices.command.d.ts +2 -2
  71. package/build/backend/commands/hwid/get-user-hwid-devices.command.d.ts.map +1 -1
  72. package/build/backend/commands/hwid/get-user-hwid-devices.command.js +3 -3
  73. package/build/backend/commands/internal-squads/bulk-actions/add-many-users-to-internal-squad.command.d.ts +15 -0
  74. package/build/backend/commands/internal-squads/bulk-actions/add-many-users-to-internal-squad.command.d.ts.map +1 -0
  75. package/build/backend/commands/internal-squads/bulk-actions/add-many-users-to-internal-squad.command.js +18 -0
  76. package/build/backend/commands/internal-squads/bulk-actions/delete-many-users-from-internal-squad.command.d.ts +15 -0
  77. package/build/backend/commands/internal-squads/bulk-actions/delete-many-users-from-internal-squad.command.d.ts.map +1 -0
  78. package/build/backend/commands/internal-squads/bulk-actions/delete-many-users-from-internal-squad.command.js +18 -0
  79. package/build/backend/commands/internal-squads/bulk-actions/index.d.ts +2 -0
  80. package/build/backend/commands/internal-squads/bulk-actions/index.d.ts.map +1 -1
  81. package/build/backend/commands/internal-squads/bulk-actions/index.js +2 -0
  82. package/build/backend/commands/metadata/user/get-user-metadata.command.d.ts +2 -2
  83. package/build/backend/commands/metadata/user/get-user-metadata.command.d.ts.map +1 -1
  84. package/build/backend/commands/metadata/user/get-user-metadata.command.js +4 -3
  85. package/build/backend/commands/metadata/user/upsert-user-metadata.command.d.ts +2 -2
  86. package/build/backend/commands/metadata/user/upsert-user-metadata.command.d.ts.map +1 -1
  87. package/build/backend/commands/metadata/user/upsert-user-metadata.command.js +3 -3
  88. package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.d.ts +1 -1
  89. package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.js +1 -1
  90. package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts +0 -1
  91. package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts.map +1 -1
  92. package/build/backend/commands/subscriptions/get-by/{get-connection-keys-by-uuid.command.d.ts → get-connection-keys-by-user-id.command.d.ts} +4 -4
  93. package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.d.ts.map +1 -0
  94. package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.js +23 -0
  95. package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts +0 -1
  96. package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -1
  97. package/build/backend/commands/subscriptions/get-by/{get-subscription-by-uuid.command.d.ts → get-subscription-by-user-id.command.d.ts} +4 -4
  98. package/build/backend/commands/subscriptions/get-by/get-subscription-by-user-id.command.d.ts.map +1 -0
  99. package/build/backend/commands/subscriptions/get-by/get-subscription-by-user-id.command.js +19 -0
  100. package/build/backend/commands/subscriptions/get-by/index.d.ts +2 -2
  101. package/build/backend/commands/subscriptions/get-by/index.d.ts.map +1 -1
  102. package/build/backend/commands/subscriptions/get-by/index.js +2 -2
  103. package/build/backend/commands/system/get-http-stats.command.d.ts +18 -0
  104. package/build/backend/commands/system/get-http-stats.command.d.ts.map +1 -0
  105. package/build/backend/commands/system/get-http-stats.command.js +22 -0
  106. package/build/backend/commands/system/index.d.ts +1 -0
  107. package/build/backend/commands/system/index.d.ts.map +1 -1
  108. package/build/backend/commands/system/index.js +1 -0
  109. package/build/backend/commands/users/actions/disable-user.command.d.ts +2 -3
  110. package/build/backend/commands/users/actions/disable-user.command.d.ts.map +1 -1
  111. package/build/backend/commands/users/actions/disable-user.command.js +4 -3
  112. package/build/backend/commands/users/actions/enable-user.command.d.ts +2 -3
  113. package/build/backend/commands/users/actions/enable-user.command.d.ts.map +1 -1
  114. package/build/backend/commands/users/actions/enable-user.command.js +4 -3
  115. package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts +2 -3
  116. package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts.map +1 -1
  117. package/build/backend/commands/users/actions/reset-user-traffic.command.js +4 -3
  118. package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts +2 -3
  119. package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts.map +1 -1
  120. package/build/backend/commands/users/actions/revoke-user-subscription.command.js +4 -3
  121. package/build/backend/commands/users/bulk/bulk-delete-users.command.d.ts +1 -1
  122. package/build/backend/commands/users/bulk/bulk-delete-users.command.js +2 -2
  123. package/build/backend/commands/users/bulk/bulk-extend-expiration-date.command.d.ts +1 -1
  124. package/build/backend/commands/users/bulk/bulk-extend-expiration-date.command.js +1 -1
  125. package/build/backend/commands/users/bulk/bulk-reset-traffic-users.command.d.ts +1 -1
  126. package/build/backend/commands/users/bulk/bulk-reset-traffic-users.command.js +2 -2
  127. package/build/backend/commands/users/bulk/bulk-revoke-users-subscription.command.d.ts +1 -1
  128. package/build/backend/commands/users/bulk/bulk-revoke-users-subscription.command.js +2 -2
  129. package/build/backend/commands/users/bulk/bulk-update-users-squads.command.d.ts +1 -1
  130. package/build/backend/commands/users/bulk/bulk-update-users-squads.command.js +2 -2
  131. package/build/backend/commands/users/bulk/bulk-update-users.command.d.ts +1 -1
  132. package/build/backend/commands/users/bulk/bulk-update-users.command.js +2 -2
  133. package/build/backend/commands/users/create-user.command.d.ts +0 -2
  134. package/build/backend/commands/users/create-user.command.d.ts.map +1 -1
  135. package/build/backend/commands/users/create-user.command.js +0 -3
  136. package/build/backend/commands/users/delete-user.command.d.ts +2 -2
  137. package/build/backend/commands/users/delete-user.command.d.ts.map +1 -1
  138. package/build/backend/commands/users/delete-user.command.js +4 -3
  139. package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts +0 -1
  140. package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts.map +1 -1
  141. package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts +0 -1
  142. package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts.map +1 -1
  143. package/build/backend/commands/users/get-by/index.d.ts +0 -1
  144. package/build/backend/commands/users/get-by/index.d.ts.map +1 -1
  145. package/build/backend/commands/users/get-by/index.js +0 -1
  146. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +3 -3
  147. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts.map +1 -1
  148. package/build/backend/commands/users/get-user-accessible-nodes.command.js +5 -4
  149. package/build/backend/commands/users/{get-user-by-uuid.command.d.ts → get-user-by-id.command.d.ts} +4 -5
  150. package/build/backend/commands/users/get-user-by-id.command.d.ts.map +1 -0
  151. package/build/backend/commands/users/{get-by/get-user-by-id.command.js → get-user-by-id.command.js} +8 -7
  152. package/build/backend/commands/users/get-user-subscription-request-history.command.d.ts +2 -2
  153. package/build/backend/commands/users/get-user-subscription-request-history.command.d.ts.map +1 -1
  154. package/build/backend/commands/users/get-user-subscription-request-history.command.js +5 -5
  155. package/build/backend/commands/users/get-users-stream.command.d.ts +0 -1
  156. package/build/backend/commands/users/get-users-stream.command.d.ts.map +1 -1
  157. package/build/backend/commands/users/get-users.command.d.ts +0 -1
  158. package/build/backend/commands/users/get-users.command.d.ts.map +1 -1
  159. package/build/backend/commands/users/index.d.ts +1 -1
  160. package/build/backend/commands/users/index.d.ts.map +1 -1
  161. package/build/backend/commands/users/index.js +1 -1
  162. package/build/backend/commands/users/resolve-user.command.d.ts +2 -2
  163. package/build/backend/commands/users/resolve-user.command.d.ts.map +1 -1
  164. package/build/backend/commands/users/resolve-user.command.js +5 -5
  165. package/build/backend/commands/users/update-user.command.d.ts +1 -2
  166. package/build/backend/commands/users/update-user.command.d.ts.map +1 -1
  167. package/build/backend/commands/users/update-user.command.js +4 -6
  168. package/build/backend/commands/users/user.response.d.ts +0 -1
  169. package/build/backend/commands/users/user.response.d.ts.map +1 -1
  170. package/build/backend/constants/cache-keys/cache-keys.constants.d.ts +2 -0
  171. package/build/backend/constants/cache-keys/cache-keys.constants.d.ts.map +1 -1
  172. package/build/backend/constants/cache-keys/cache-keys.constants.js +2 -0
  173. package/build/backend/constants/errors/errors.d.ts +25 -5
  174. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  175. package/build/backend/constants/errors/errors.js +25 -5
  176. package/build/backend/models/extended-users.schema.d.ts +0 -1
  177. package/build/backend/models/extended-users.schema.d.ts.map +1 -1
  178. package/build/backend/models/index.d.ts +1 -0
  179. package/build/backend/models/index.d.ts.map +1 -1
  180. package/build/backend/models/index.js +1 -0
  181. package/build/backend/models/path-params.schema.d.ts +3 -0
  182. package/build/backend/models/path-params.schema.d.ts.map +1 -0
  183. package/build/backend/models/path-params.schema.js +5 -0
  184. package/build/backend/models/torrent-blocker-report.schema.d.ts +0 -1
  185. package/build/backend/models/torrent-blocker-report.schema.d.ts.map +1 -1
  186. package/build/backend/models/torrent-blocker-report.schema.js +0 -1
  187. package/build/backend/models/users.schema.d.ts +0 -1
  188. package/build/backend/models/users.schema.d.ts.map +1 -1
  189. package/build/backend/models/users.schema.js +0 -1
  190. package/build/backend/models/webhook/webhook.schema.d.ts +0 -6
  191. package/build/backend/models/webhook/webhook.schema.d.ts.map +1 -1
  192. package/build/frontend/api/controllers/bandwidth-stats.js +8 -20
  193. package/build/frontend/api/controllers/connections.js +1 -1
  194. package/build/frontend/api/controllers/hwid.js +1 -1
  195. package/build/frontend/api/controllers/internal-squads.js +2 -0
  196. package/build/frontend/api/controllers/metadata.js +4 -4
  197. package/build/frontend/api/controllers/subscriptions.js +2 -2
  198. package/build/frontend/api/controllers/system.js +1 -0
  199. package/build/frontend/api/controllers/users.js +8 -13
  200. package/build/frontend/api/controllers-info.js +15 -15
  201. package/build/frontend/api/routes.js +22 -23
  202. package/build/frontend/commands/bandwidth-stats/index.js +1 -1
  203. package/build/frontend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.js +50 -0
  204. package/build/frontend/commands/bandwidth-stats/internal-squads/get-internal-squad-user-usage.command.js +34 -0
  205. package/build/frontend/commands/bandwidth-stats/{legacy → internal-squads}/index.js +2 -2
  206. package/build/frontend/commands/bandwidth-stats/nodes/get-node-usage.command.js +38 -0
  207. package/build/frontend/commands/bandwidth-stats/nodes/index.js +1 -0
  208. package/build/frontend/commands/bandwidth-stats/users/get-stats-user-usage.command.js +5 -4
  209. package/build/frontend/commands/connections/connections-by-node-result.command.js +1 -1
  210. package/build/frontend/commands/connections/connections-by-user-result.command.js +1 -2
  211. package/build/frontend/commands/connections/connections-by-user.command.js +4 -3
  212. package/build/frontend/commands/connections/drop-connections.command.js +3 -3
  213. package/build/frontend/commands/hwid/create-user-hwid-device.command.js +2 -2
  214. package/build/frontend/commands/hwid/delete-all-user-hwid-devices.command.js +1 -1
  215. package/build/frontend/commands/hwid/delete-user-hwid-device.command.js +1 -1
  216. package/build/frontend/commands/hwid/get-top-users-by-hwid-devices.command.js +0 -1
  217. package/build/frontend/commands/hwid/get-user-hwid-devices.command.js +3 -3
  218. package/build/frontend/commands/internal-squads/bulk-actions/add-many-users-to-internal-squad.command.js +18 -0
  219. package/build/frontend/commands/internal-squads/bulk-actions/delete-many-users-from-internal-squad.command.js +18 -0
  220. package/build/frontend/commands/internal-squads/bulk-actions/index.js +2 -0
  221. package/build/frontend/commands/metadata/user/get-user-metadata.command.js +4 -3
  222. package/build/frontend/commands/metadata/user/upsert-user-metadata.command.js +3 -3
  223. package/build/frontend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.js +1 -1
  224. package/build/frontend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.js +23 -0
  225. package/build/frontend/commands/subscriptions/get-by/get-subscription-by-user-id.command.js +19 -0
  226. package/build/frontend/commands/subscriptions/get-by/index.js +2 -2
  227. package/build/frontend/commands/system/get-http-stats.command.js +22 -0
  228. package/build/frontend/commands/system/index.js +1 -0
  229. package/build/frontend/commands/users/actions/disable-user.command.js +4 -3
  230. package/build/frontend/commands/users/actions/enable-user.command.js +4 -3
  231. package/build/frontend/commands/users/actions/reset-user-traffic.command.js +4 -3
  232. package/build/frontend/commands/users/actions/revoke-user-subscription.command.js +4 -3
  233. package/build/frontend/commands/users/bulk/bulk-delete-users.command.js +2 -2
  234. package/build/frontend/commands/users/bulk/bulk-extend-expiration-date.command.js +1 -1
  235. package/build/frontend/commands/users/bulk/bulk-reset-traffic-users.command.js +2 -2
  236. package/build/frontend/commands/users/bulk/bulk-revoke-users-subscription.command.js +2 -2
  237. package/build/frontend/commands/users/bulk/bulk-update-users-squads.command.js +2 -2
  238. package/build/frontend/commands/users/bulk/bulk-update-users.command.js +2 -2
  239. package/build/frontend/commands/users/create-user.command.js +0 -3
  240. package/build/frontend/commands/users/delete-user.command.js +4 -3
  241. package/build/frontend/commands/users/get-by/index.js +0 -1
  242. package/build/frontend/commands/users/get-user-accessible-nodes.command.js +5 -4
  243. package/build/frontend/commands/users/{get-by/get-user-by-id.command.js → get-user-by-id.command.js} +8 -7
  244. package/build/frontend/commands/users/get-user-subscription-request-history.command.js +5 -5
  245. package/build/frontend/commands/users/index.js +1 -1
  246. package/build/frontend/commands/users/resolve-user.command.js +5 -5
  247. package/build/frontend/commands/users/update-user.command.js +4 -6
  248. package/build/frontend/constants/cache-keys/cache-keys.constants.js +2 -0
  249. package/build/frontend/constants/errors/errors.js +25 -5
  250. package/build/frontend/models/index.js +1 -0
  251. package/build/frontend/models/path-params.schema.js +5 -0
  252. package/build/frontend/models/torrent-blocker-report.schema.js +0 -1
  253. package/build/frontend/models/users.schema.js +0 -1
  254. package/package.json +1 -1
  255. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.d.ts +0 -26
  256. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.d.ts.map +0 -1
  257. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.js +0 -28
  258. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.d.ts +0 -27
  259. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.d.ts.map +0 -1
  260. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.js +0 -29
  261. package/build/backend/commands/bandwidth-stats/legacy/index.d.ts +0 -3
  262. package/build/backend/commands/bandwidth-stats/legacy/index.d.ts.map +0 -1
  263. package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-uuid.command.d.ts.map +0 -1
  264. package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-uuid.command.js +0 -22
  265. package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.d.ts.map +0 -1
  266. package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +0 -19
  267. package/build/backend/commands/users/get-by/get-user-by-id.command.d.ts +0 -61
  268. package/build/backend/commands/users/get-by/get-user-by-id.command.d.ts.map +0 -1
  269. package/build/backend/commands/users/get-user-by-uuid.command.d.ts.map +0 -1
  270. package/build/backend/commands/users/get-user-by-uuid.command.js +0 -17
  271. package/build/frontend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.js +0 -28
  272. package/build/frontend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.js +0 -29
  273. package/build/frontend/commands/subscriptions/get-by/get-connection-keys-by-uuid.command.js +0 -22
  274. package/build/frontend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +0 -19
  275. package/build/frontend/commands/users/get-user-by-uuid.command.js +0 -17
@@ -11,10 +11,10 @@ export declare namespace ResolveUserCommand {
11
11
  }, z.core.$strip>;
12
12
  const ResponseSchema: z.ZodObject<{
13
13
  response: z.ZodObject<{
14
- uuid: z.ZodUUID;
15
- username: z.ZodString;
16
14
  id: z.ZodNumber;
15
+ username: z.ZodString;
17
16
  shortUuid: z.ZodString;
17
+ uuid: z.ZodUUID;
18
18
  }, z.core.$strip>;
19
19
  }, z.core.$strip>;
20
20
  type RequestBody = z.infer<typeof RequestBodySchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/resolve-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;qBAiBzB,CAAC;IAEC,MAAM,cAAc;;;;;;;qBAOzB,CAAC;IAEH,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"resolve-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/resolve-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,eAAe,2CAM3B,CAAC;IAEK,MAAM,iBAAiB;;;;;qBAiBzB,CAAC;IAEC,MAAM,cAAc;;;;;;;qBAOzB,CAAC;IAEH,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -8,10 +8,10 @@ var ResolveUserCommand;
8
8
  (function (ResolveUserCommand) {
9
9
  ResolveUserCommand.url = api_1.REST_API.USERS.RESOLVE;
10
10
  ResolveUserCommand.TSQ_url = ResolveUserCommand.url;
11
- ResolveUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.RESOLVE, 'post', 'Resolve a user', { scope: 'resolve', kind: 'read' });
11
+ ResolveUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.RESOLVE, 'post', 'Resolve a user', { scope: 'resolve', kind: 'read' }, 'Resolve a user by ID, Short UUID or username. Exactly one of the fields must be provided.');
12
12
  ResolveUserCommand.RequestBodySchema = zod_1.z
13
13
  .object({
14
- uuid: zod_1.z.uuid().optional(),
14
+ uuid: zod_1.z.uuid().optional().meta({ deprecated: true }),
15
15
  id: zod_1.z.number().optional(),
16
16
  shortUuid: zod_1.z.string().optional(),
17
17
  username: zod_1.z.string().optional(),
@@ -20,14 +20,14 @@ var ResolveUserCommand;
20
20
  const provided = [data.uuid, data.id, data.shortUuid, data.username].filter((v) => v !== undefined);
21
21
  return provided.length === 1;
22
22
  }, {
23
- error: 'Exactly one of uuid, id, shortUuid, or username must be provided'
23
+ error: 'Exactly one of uuid, id, shortUuid, or username must be provided',
24
24
  });
25
25
  ResolveUserCommand.ResponseSchema = zod_1.z.object({
26
26
  response: zod_1.z.object({
27
- uuid: zod_1.z.uuid(),
28
- username: zod_1.z.string(),
29
27
  id: zod_1.z.number(),
28
+ username: zod_1.z.string(),
30
29
  shortUuid: zod_1.z.string(),
30
+ uuid: zod_1.z.uuid().meta({ deprecated: true }),
31
31
  }),
32
32
  });
33
33
  })(ResolveUserCommand || (exports.ResolveUserCommand = ResolveUserCommand = {}));
@@ -5,7 +5,7 @@ export declare namespace UpdateUserCommand {
5
5
  const endpointDetails: import("../../constants").EndpointDetails;
6
6
  const RequestBodySchema: z.ZodObject<{
7
7
  username: z.ZodOptional<z.ZodString>;
8
- uuid: z.ZodOptional<z.ZodUUID>;
8
+ id: z.ZodOptional<z.ZodNumber>;
9
9
  status: z.ZodOptional<z.ZodEnum<{
10
10
  DISABLED: "DISABLED";
11
11
  ACTIVE: "ACTIVE";
@@ -29,7 +29,6 @@ export declare namespace UpdateUserCommand {
29
29
  }, z.core.$strip>;
30
30
  const ResponseSchema: z.ZodObject<{
31
31
  response: z.ZodObject<{
32
- uuid: z.ZodUUID;
33
32
  id: z.ZodNumber;
34
33
  shortUuid: z.ZodString;
35
34
  username: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"update-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/update-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;qBAiDxB,CAAC;IAEA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"update-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/update-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAM3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;qBA2CxB,CAAC;IAEA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -9,13 +9,11 @@ var UpdateUserCommand;
9
9
  (function (UpdateUserCommand) {
10
10
  UpdateUserCommand.url = api_1.REST_API.USERS.UPDATE;
11
11
  UpdateUserCommand.TSQ_url = UpdateUserCommand.url;
12
- UpdateUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.UPDATE, 'patch', 'Update a user by UUID or username', { scope: 'update', kind: 'write' });
12
+ UpdateUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.UPDATE, 'patch', 'Update a user', { scope: 'update', kind: 'write' }, 'Update a user by ID or username. Exactly one of the fields must be provided.');
13
13
  UpdateUserCommand.RequestBodySchema = zod_1.z
14
14
  .object({
15
15
  username: zod_1.z.optional(zod_1.z.string().describe('Username of the user')),
16
- uuid: zod_1.z.optional(zod_1.z
17
- .uuid()
18
- .describe('UUID of the user. UUID has higher priority than username, so if both are provided, username will be ignored.')),
16
+ id: zod_1.z.optional(zod_1.z.number().describe('ID of the user')),
19
17
  status: zod_1.z.enum([constants_1.USERS_STATUS.ACTIVE, constants_1.USERS_STATUS.DISABLED]).optional(),
20
18
  trafficLimitBytes: zod_1.z
21
19
  .number()
@@ -48,8 +46,8 @@ var UpdateUserCommand;
48
46
  .optional(zod_1.z.nullable(zod_1.z.uuid()))
49
47
  .describe('Optional. External squad UUID.'),
50
48
  })
51
- .refine((data) => data.uuid || data.username, {
52
- error: 'Either uuid or username must be provided',
49
+ .refine((d) => d.username ?? d.id, {
50
+ error: 'At least one of username, id must be provided',
53
51
  });
54
52
  UpdateUserCommand.ResponseSchema = user_response_1.UserResponseSchema;
55
53
  })(UpdateUserCommand || (exports.UpdateUserCommand = UpdateUserCommand = {}));
@@ -1,7 +1,6 @@
1
1
  import z from 'zod';
2
2
  export declare const UserResponseSchema: z.ZodObject<{
3
3
  response: z.ZodObject<{
4
- uuid: z.ZodUUID;
5
4
  id: z.ZodNumber;
6
5
  shortUuid: z.ZodString;
7
6
  username: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"user.response.d.ts","sourceRoot":"","sources":["../../../../commands/users/user.response.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE7B,CAAC"}
1
+ {"version":3,"file":"user.response.d.ts","sourceRoot":"","sources":["../../../../commands/users/user.response.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE7B,CAAC"}
@@ -13,6 +13,7 @@ export declare const CACHE_KEYS: {
13
13
  readonly NODE_XRAY_UPTIME: (uuid: string) => string;
14
14
  readonly RAW_INBOUND: (uuid: string) => string;
15
15
  readonly XRAY_JSON_TEMPLATE: (uuid: string) => string;
16
+ readonly EXTERNAL_SQUAD_TEMPLATE_NAME: (uuid: string, type: TSubscriptionTemplateType) => string;
16
17
  };
17
18
  export declare const CACHE_KEYS_TTL: {
18
19
  readonly REMNAWAVE_SETTINGS: 86400;
@@ -23,6 +24,7 @@ export declare const CACHE_KEYS_TTL: {
23
24
  readonly NODE_XRAY_UPTIME: 16;
24
25
  readonly RAW_INBOUND: 3600;
25
26
  readonly XRAY_JSON_TEMPLATE: 3600;
27
+ readonly EXTERNAL_SQUAD_TEMPLATE_NAME: 3600;
26
28
  };
27
29
  export declare const INTERNAL_CACHE_KEYS: {
28
30
  readonly NODE_USER_USAGE_PREFIX: "node_user_usage:";
@@ -1 +1 @@
1
- {"version":3,"file":"cache-keys.constants.d.ts","sourceRoot":"","sources":["../../../../constants/cache-keys/cache-keys.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,UAAU;;6CAEa,MAAM;2CACR,MAAM,QAAQ,yBAAyB;kDAEhC,MAAM;oDACJ,MAAM;;sCAEpB,MAAM;uCACL,MAAM;uCACN,MAAM;mCACV,MAAM;sCACH,MAAM;iCACX,MAAM;wCACC,MAAM;CAC3B,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC;AAEX,eAAO,MAAM,mBAAmB;;uCAEF,MAAM;;;;CAK1B,CAAC;AAEX,eAAO,MAAM,uBAAuB;;CAE1B,CAAC"}
1
+ {"version":3,"file":"cache-keys.constants.d.ts","sourceRoot":"","sources":["../../../../constants/cache-keys/cache-keys.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,UAAU;;6CAEa,MAAM;2CACR,MAAM,QAAQ,yBAAyB;kDAEhC,MAAM;oDACJ,MAAM;;sCAEpB,MAAM;uCACL,MAAM;uCACN,MAAM;mCACV,MAAM;sCACH,MAAM;iCACX,MAAM;wCACC,MAAM;kDACI,MAAM,QAAQ,yBAAyB;CAEtE,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,mBAAmB;;uCAEF,MAAM;;;;CAK1B,CAAC;AAEX,eAAO,MAAM,uBAAuB;;CAE1B,CAAC"}
@@ -15,6 +15,7 @@ exports.CACHE_KEYS = {
15
15
  NODE_XRAY_UPTIME: (uuid) => `node_xray_uptime:${uuid}`,
16
16
  RAW_INBOUND: (uuid) => `raw_inbound:${uuid}`,
17
17
  XRAY_JSON_TEMPLATE: (uuid) => `xray_json_template:${uuid}`,
18
+ EXTERNAL_SQUAD_TEMPLATE_NAME: (uuid, type) => `external_squad_template_name:${uuid}:${type}`,
18
19
  };
19
20
  exports.CACHE_KEYS_TTL = {
20
21
  REMNAWAVE_SETTINGS: 86400, // 1 day
@@ -25,6 +26,7 @@ exports.CACHE_KEYS_TTL = {
25
26
  NODE_XRAY_UPTIME: 16, // 16 seconds
26
27
  RAW_INBOUND: 3600, // 1 hour
27
28
  XRAY_JSON_TEMPLATE: 3600, // 1 hour
29
+ EXTERNAL_SQUAD_TEMPLATE_NAME: 3600, // 1 hour
28
30
  };
29
31
  exports.INTERNAL_CACHE_KEYS = {
30
32
  NODE_USER_USAGE_PREFIX: 'node_user_usage:',
@@ -484,11 +484,6 @@ export declare const ERRORS: {
484
484
  readonly message: "Activate all inbounds error";
485
485
  readonly httpCode: 500;
486
486
  };
487
- readonly GET_NODES_USER_USAGE_BY_RANGE_ERROR: {
488
- readonly code: "A094";
489
- readonly message: "Get nodes user usage by range error";
490
- readonly httpCode: 500;
491
- };
492
487
  readonly CREATE_HWID_USER_DEVICE_ERROR: {
493
488
  readonly code: "A096";
494
489
  readonly message: "Create hwid user device error";
@@ -1179,5 +1174,30 @@ export declare const ERRORS: {
1179
1174
  readonly message: "Either nodeUuid or name must be provided";
1180
1175
  readonly httpCode: 400;
1181
1176
  };
1177
+ readonly CUSTOM_RAW_REMARK_VALIDATION_ERROR: {
1178
+ readonly code: "A231";
1179
+ readonly message: "Invalid custom raw remark";
1180
+ readonly httpCode: 500;
1181
+ readonly withMessage: (message: string) => {
1182
+ code: string;
1183
+ message: string;
1184
+ httpCode: number;
1185
+ };
1186
+ };
1187
+ readonly GET_INTERNAL_SQUAD_USAGE_ERROR: {
1188
+ readonly code: "A232";
1189
+ readonly message: "Get internal squad usage error";
1190
+ readonly httpCode: 500;
1191
+ };
1192
+ readonly ADD_MANY_USERS_TO_INTERNAL_SQUAD_ERROR: {
1193
+ readonly code: "A233";
1194
+ readonly message: "Add many users to internal squad error";
1195
+ readonly httpCode: 500;
1196
+ };
1197
+ readonly REMOVE_MANY_USERS_FROM_INTERNAL_SQUAD_ERROR: {
1198
+ readonly code: "A234";
1199
+ readonly message: "Remove many users from internal squad error";
1200
+ readonly httpCode: 500;
1201
+ };
1182
1202
  };
1183
1203
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ERRORS = {
455
455
  message: 'Activate all inbounds error',
456
456
  httpCode: 500,
457
457
  },
458
- GET_NODES_USER_USAGE_BY_RANGE_ERROR: {
459
- code: 'A094',
460
- message: 'Get nodes user usage by range error',
461
- httpCode: 500,
462
- },
463
458
  CREATE_HWID_USER_DEVICE_ERROR: {
464
459
  code: 'A096',
465
460
  message: 'Create hwid user device error',
@@ -1150,4 +1145,29 @@ exports.ERRORS = {
1150
1145
  message: 'Either nodeUuid or name must be provided',
1151
1146
  httpCode: 400,
1152
1147
  },
1148
+ CUSTOM_RAW_REMARK_VALIDATION_ERROR: {
1149
+ code: 'A231',
1150
+ message: 'Invalid custom raw remark',
1151
+ httpCode: 500,
1152
+ withMessage: (message) => ({
1153
+ code: 'A231',
1154
+ message,
1155
+ httpCode: 500,
1156
+ }),
1157
+ },
1158
+ GET_INTERNAL_SQUAD_USAGE_ERROR: {
1159
+ code: 'A232',
1160
+ message: 'Get internal squad usage error',
1161
+ httpCode: 500,
1162
+ },
1163
+ ADD_MANY_USERS_TO_INTERNAL_SQUAD_ERROR: {
1164
+ code: 'A233',
1165
+ message: 'Add many users to internal squad error',
1166
+ httpCode: 500,
1167
+ },
1168
+ REMOVE_MANY_USERS_FROM_INTERNAL_SQUAD_ERROR: {
1169
+ code: 'A234',
1170
+ message: 'Remove many users from internal squad error',
1171
+ httpCode: 500,
1172
+ },
1153
1173
  };
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  export declare const ExtendedUsersSchema: z.ZodObject<{
3
- uuid: z.ZodUUID;
4
3
  id: z.ZodNumber;
5
4
  shortUuid: z.ZodString;
6
5
  username: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"extended-users.schema.d.ts","sourceRoot":"","sources":["../../../models/extended-users.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI9B,CAAC"}
1
+ {"version":3,"file":"extended-users.schema.d.ts","sourceRoot":"","sources":["../../../models/extended-users.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI9B,CAAC"}
@@ -33,4 +33,5 @@ export * from './torrent-blocker-report.schema';
33
33
  export * from './users.schema';
34
34
  export * from './webhook';
35
35
  export * from './xray-json-advanced';
36
+ export * from './path-params.schema';
36
37
  //# 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,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,yBAAyB,CAAC;AAC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49,4 @@ __exportStar(require("./torrent-blocker-report.schema"), exports);
49
49
  __exportStar(require("./users.schema"), exports);
50
50
  __exportStar(require("./webhook"), exports);
51
51
  __exportStar(require("./xray-json-advanced"), exports);
52
+ __exportStar(require("./path-params.schema"), exports);
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const numberParamSchema: z.ZodCoercedNumber<unknown>;
3
+ //# sourceMappingURL=path-params.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-params.schema.d.ts","sourceRoot":"","sources":["../../../models/path-params.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB,6BAA+B,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.numberParamSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.numberParamSchema = zod_1.z.coerce.number().positive();
@@ -4,7 +4,6 @@ export declare const TorrentBlockerReportSchema: z.ZodObject<{
4
4
  userId: z.ZodNumber;
5
5
  nodeId: z.ZodNumber;
6
6
  user: z.ZodObject<{
7
- uuid: z.ZodUUID;
8
7
  username: z.ZodString;
9
8
  }, z.core.$strip>;
10
9
  node: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"torrent-blocker-report.schema.d.ts","sourceRoot":"","sources":["../../../models/torrent-blocker-report.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2CrC,CAAC"}
1
+ {"version":3,"file":"torrent-blocker-report.schema.d.ts","sourceRoot":"","sources":["../../../models/torrent-blocker-report.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0CrC,CAAC"}
@@ -9,7 +9,6 @@ exports.TorrentBlockerReportSchema = zod_1.z.object({
9
9
  userId: zod_1.z.number(),
10
10
  nodeId: zod_1.z.number(),
11
11
  user: extended_users_schema_1.ExtendedUsersSchema.pick({
12
- uuid: true,
13
12
  username: true,
14
13
  }),
15
14
  node: nodes_schema_1.NodesSchema.pick({
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  export declare const UsersSchema: z.ZodObject<{
3
- uuid: z.ZodUUID;
4
3
  id: z.ZodNumber;
5
4
  shortUuid: z.ZodString;
6
5
  username: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"users.schema.d.ts","sourceRoot":"","sources":["../../../models/users.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBtB,CAAC"}
1
+ {"version":3,"file":"users.schema.d.ts","sourceRoot":"","sources":["../../../models/users.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBtB,CAAC"}
@@ -4,7 +4,6 @@ exports.UsersSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const constants_1 = require("../constants");
6
6
  exports.UsersSchema = zod_1.z.object({
7
- uuid: zod_1.z.uuid(),
8
7
  id: zod_1.z.number(),
9
8
  shortUuid: zod_1.z.string(),
10
9
  username: zod_1.z.string(),
@@ -18,7 +18,6 @@ export declare const RemnawaveWebhookUserEvents: z.ZodObject<{
18
18
  }>;
19
19
  timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
20
20
  data: z.ZodObject<{
21
- uuid: z.ZodUUID;
22
21
  id: z.ZodNumber;
23
22
  shortUuid: z.ZodString;
24
23
  username: z.ZodString;
@@ -78,7 +77,6 @@ export declare const RemnawaveWebhookUserHwidDevicesEvents: z.ZodObject<{
78
77
  timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
79
78
  data: z.ZodObject<{
80
79
  user: z.ZodObject<{
81
- uuid: z.ZodUUID;
82
80
  id: z.ZodNumber;
83
81
  shortUuid: z.ZodString;
84
82
  username: z.ZodString;
@@ -386,7 +384,6 @@ export declare const RemnawaveWebhookTorrentBlockerEvents: z.ZodObject<{
386
384
  note: z.ZodNullable<z.ZodString>;
387
385
  }, z.core.$strip>;
388
386
  user: z.ZodObject<{
389
- uuid: z.ZodUUID;
390
387
  id: z.ZodNumber;
391
388
  shortUuid: z.ZodString;
392
389
  username: z.ZodString;
@@ -478,7 +475,6 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<[z.Zod
478
475
  }>;
479
476
  timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
480
477
  data: z.ZodObject<{
481
- uuid: z.ZodUUID;
482
478
  id: z.ZodNumber;
483
479
  shortUuid: z.ZodString;
484
480
  username: z.ZodString;
@@ -537,7 +533,6 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<[z.Zod
537
533
  timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
538
534
  data: z.ZodObject<{
539
535
  user: z.ZodObject<{
540
- uuid: z.ZodUUID;
541
536
  id: z.ZodNumber;
542
537
  shortUuid: z.ZodString;
543
538
  username: z.ZodString;
@@ -840,7 +835,6 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<[z.Zod
840
835
  note: z.ZodNullable<z.ZodString>;
841
836
  }, z.core.$strip>;
842
837
  user: z.ZodObject<{
843
- uuid: z.ZodUUID;
844
838
  id: z.ZodNumber;
845
839
  shortUuid: z.ZodString;
846
840
  username: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.schema.d.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AC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEjF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACpF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACpF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAC1F,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AACxF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAClF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,qCAAqC,CAC/C,CAAC;AACF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,oCAAoC,CAC9C,CAAC"}
@@ -1,38 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BANDWIDTH_STATS_ROUTES = exports.BANDWIDTH_STATS_USERS_CONTROLLER = exports.BANDWIDTH_STATS_NODES_CONTROLLER = exports.BANDWIDTH_STATS_USERS_ROUTE = exports.BANDWIDTH_STATS_NODES_ROUTE = exports.BANDWIDTH_STATS_CONTROLLER = void 0;
3
+ exports.BANDWIDTH_STATS_ROUTES = exports.BANDWIDTH_STATS_INTERNAL_SQUADS_CONTROLLER = exports.BANDWIDTH_STATS_USERS_CONTROLLER = exports.BANDWIDTH_STATS_NODES_CONTROLLER = exports.BANDWIDTH_STATS_INTERNAL_SQUADS_ROUTE = exports.BANDWIDTH_STATS_USERS_ROUTE = exports.BANDWIDTH_STATS_NODES_ROUTE = exports.BANDWIDTH_STATS_CONTROLLER = void 0;
4
4
  exports.BANDWIDTH_STATS_CONTROLLER = 'bandwidth-stats';
5
5
  exports.BANDWIDTH_STATS_NODES_ROUTE = 'nodes';
6
6
  exports.BANDWIDTH_STATS_USERS_ROUTE = 'users';
7
+ exports.BANDWIDTH_STATS_INTERNAL_SQUADS_ROUTE = 'internal-squads';
7
8
  exports.BANDWIDTH_STATS_NODES_CONTROLLER = `${exports.BANDWIDTH_STATS_CONTROLLER}/${exports.BANDWIDTH_STATS_NODES_ROUTE}`;
8
9
  exports.BANDWIDTH_STATS_USERS_CONTROLLER = `${exports.BANDWIDTH_STATS_CONTROLLER}/${exports.BANDWIDTH_STATS_USERS_ROUTE}`;
9
- // Variants:
10
- // 1. Nodes -> Metrics
11
- // 2. Nodes -> Management -> Show usage (!need legacy)
12
- // 3. Users -> User -> Show Usage (!need legacy)
10
+ exports.BANDWIDTH_STATS_INTERNAL_SQUADS_CONTROLLER = `${exports.BANDWIDTH_STATS_CONTROLLER}/${exports.BANDWIDTH_STATS_INTERNAL_SQUADS_ROUTE}`;
13
11
  exports.BANDWIDTH_STATS_ROUTES = {
14
12
  NODES: {
15
- // GET /bandwidth-stats/nodes –– Nodes -> Metrics
16
13
  GET: '',
17
- // GET /bandwidth-stats/nodes/realtime –– Nodes -> Management -> Metric Cards
18
14
  GET_REALTIME: 'realtime',
19
- // GET /bandwidth-stats/nodes/:nodeUuid/users –– Nodes -> Management -> Show usage
20
15
  GET_USERS: (uuid) => `${uuid}/users`,
21
- // POST /bandwidth-stats/nodes/users –– Nodes -> Custom Graphs
22
16
  GET_USERS_BY_NODES: 'users',
17
+ GET_USAGE: 'usage',
23
18
  },
24
19
  USERS: {
25
- // GET /bandwidth-stats/users/:userUuid –– Users -> User -> Show Usage
26
- GET_BY_UUID: (uuid) => `${uuid}`,
20
+ GET_BY_ID: (userId) => `${userId}`,
27
21
  },
28
- LEGACY: {
29
- NODES: {
30
- // GET /bandwidth-stats/nodes/:nodeUuid/users/legacy –– Nodes -> Management -> Show usage (legacy)
31
- GET_USERS: (uuid) => `${uuid}/users/legacy`,
32
- },
33
- USERS: {
34
- // GET /bandwidth-stats/users/:userUuid/legacy –– Users -> User -> Show Usage (legacy)
35
- GET_BY_UUID: (uuid) => `${uuid}/legacy`,
36
- },
22
+ INTERNAL_SQUADS: {
23
+ GET_USAGE: (uuid) => `${uuid}/usage`,
24
+ USER_USAGE: (squadUuid, userId) => `${squadUuid}/users/${userId}/usage`,
37
25
  },
38
26
  };
@@ -4,7 +4,7 @@ exports.CONNECTIONS_ROUTES = exports.CONNECTIONS_CONTROLLER = void 0;
4
4
  exports.CONNECTIONS_CONTROLLER = 'connections';
5
5
  exports.CONNECTIONS_ROUTES = {
6
6
  // POST
7
- CONNECTIONS_BY_USER: (uuid) => `by-user/${uuid}`,
7
+ CONNECTIONS_BY_USER: (userId) => `by-user/${userId}`,
8
8
  // GET
9
9
  CONNECTIONS_BY_USER_RESULT: (jobId) => `by-user/${jobId}`,
10
10
  // POST
@@ -5,7 +5,7 @@ exports.HWID_CONTROLLER = 'hwid';
5
5
  exports.HWID_ROUTES = {
6
6
  GET_ALL_HWID_DEVICES: 'devices', // get
7
7
  CREATE_USER_HWID_DEVICE: 'devices',
8
- GET_USER_HWID_DEVICES: (userUuid) => `devices/${userUuid}`,
8
+ GET_USER_HWID_DEVICES: (userId) => `devices/${userId}`,
9
9
  DELETE_USER_HWID_DEVICE: 'devices/delete',
10
10
  DELETE_ALL_USER_HWID_DEVICES: 'devices/delete-all',
11
11
  STATS: 'devices/stats', // get
@@ -14,6 +14,8 @@ exports.INTERNAL_SQUADS_ROUTES = {
14
14
  BULK_ACTIONS: {
15
15
  ADD_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/add-users`, // Add users to internal squad // post
16
16
  REMOVE_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/remove-users`, // Remove users from internal squad // delete
17
+ ADD_MANY_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/add-many-users`, // Add many users to internal squad // post
18
+ REMOVE_MANY_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/remove-many-users`, // Remove many users from internal squad // delete
17
19
  },
18
20
  ACTIONS: {
19
21
  REORDER: `${ACTIONS_ROUTE}/reorder`,
@@ -4,11 +4,11 @@ exports.METADATA_ROUTES = exports.METADATA_CONTROLLER = void 0;
4
4
  exports.METADATA_CONTROLLER = 'metadata';
5
5
  exports.METADATA_ROUTES = {
6
6
  NODE: {
7
- GET: (uuid) => `node/${uuid}`,
8
- UPSERT: (uuid) => `node/${uuid}`,
7
+ GET: (nodeId) => `node/${nodeId}`,
8
+ UPSERT: (nodeId) => `node/${nodeId}`,
9
9
  },
10
10
  USER: {
11
- GET: (uuid) => `user/${uuid}`,
12
- UPSERT: (uuid) => `user/${uuid}`,
11
+ GET: (userId) => `user/${userId}`,
12
+ UPSERT: (userId) => `user/${userId}`,
13
13
  },
14
14
  };
@@ -6,12 +6,12 @@ exports.SUBSCRIPTIONS_ROUTES = {
6
6
  GET: '',
7
7
  GET_BY: {
8
8
  USERNAME: (username) => `by-username/${username}`,
9
- UUID: (uuid) => `by-uuid/${uuid}`,
9
+ ID: (userId) => `by-id/${userId}`,
10
10
  SHORT_UUID: (shortUuid) => `by-short-uuid/${shortUuid}`,
11
11
  SHORT_UUID_RAW: (shortUuid) => `by-short-uuid/${shortUuid}/raw`,
12
12
  },
13
13
  SUBPAGE: {
14
14
  GET_CONFIG: (shortUuid) => `subpage-config/${shortUuid}`,
15
15
  },
16
- GET_CONNECTION_KEYS_BY_UUID: (uuid) => `connection-keys/${uuid}`,
16
+ GET_CONNECTION_KEYS_BY_USER_ID: (userId) => `connection-keys/${userId}`,
17
17
  };
@@ -9,6 +9,7 @@ exports.SYSTEM_ROUTES = {
9
9
  NODES_STATS: 'stats/nodes',
10
10
  RECAP: 'stats/recap',
11
11
  NODES_METRICS: 'nodes/metrics',
12
+ HTTP: 'stats/http',
12
13
  },
13
14
  TOOLS: {
14
15
  GENERATE_X25519: 'tools/x25519/generate',
@@ -8,24 +8,19 @@ exports.USERS_ROUTES = {
8
8
  UPDATE: '',
9
9
  GET: '',
10
10
  STREAM: 'stream',
11
- DELETE: (uuid) => `${uuid}`,
12
- GET_BY_UUID: (uuid) => `${uuid}`,
13
- ACCESSIBLE_NODES: (uuid) => `${uuid}/accessible-nodes`,
14
- SUBSCRIPTION_REQUEST_HISTORY: (uuid) => `${uuid}/subscription-request-history`,
11
+ DELETE: (userId) => `${userId}`,
12
+ GET_BY_ID: (userId) => `${userId}`,
13
+ ACCESSIBLE_NODES: (userId) => `${userId}/accessible-nodes`,
14
+ SUBSCRIPTION_REQUEST_HISTORY: (userId) => `${userId}/subscription-request-history`,
15
15
  ACTIONS: {
16
- ENABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/enable`,
17
- DISABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/disable`,
18
- RESET_TRAFFIC: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/reset-traffic`,
19
- REVOKE_SUBSCRIPTION: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/revoke`,
16
+ ENABLE: (userId) => `${userId}/${exports.USERS_ACTIONS_ROUTE}/enable`,
17
+ DISABLE: (userId) => `${userId}/${exports.USERS_ACTIONS_ROUTE}/disable`,
18
+ RESET_TRAFFIC: (userId) => `${userId}/${exports.USERS_ACTIONS_ROUTE}/reset-traffic`,
19
+ REVOKE_SUBSCRIPTION: (userId) => `${userId}/${exports.USERS_ACTIONS_ROUTE}/revoke`,
20
20
  },
21
21
  GET_BY: {
22
- ID: (id) => `by-id/${id}`,
23
22
  SHORT_UUID: (shortUuid) => `by-short-uuid/${shortUuid}`,
24
23
  USERNAME: (username) => `by-username/${username}`,
25
- SUBSCRIPTION_UUID: (subscriptionUuid) => `by-subscription-uuid/${subscriptionUuid}`,
26
- TELEGRAM_ID: (telegramId) => `by-telegram-id/${telegramId}`,
27
- EMAIL: (email) => `by-email/${email}`,
28
- TAG: (tag) => `by-tag/${tag}`,
29
24
  },
30
25
  BULK: {
31
26
  DELETE_BY_STATUS: 'bulk/delete-by-status',
@@ -2,21 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CONTROLLERS_INFO = void 0;
4
4
  exports.CONTROLLERS_INFO = {
5
- AUTH: {
6
- tag: 'Auth Controller',
7
- description: 'Used to authenticate admin users.',
8
- resource: 'auth',
9
- },
10
- PASSKEYS: {
11
- tag: 'Passkeys Controller',
12
- description: 'Management of Passkeys.',
13
- resource: 'passkeys',
14
- },
15
- API_TOKENS: {
16
- tag: 'API Tokens Controller',
17
- description: "Manage API tokens to use in your code. This controller can't be used with API token, only with Admin JWT token",
18
- resource: 'api-tokens',
19
- },
20
5
  USERS: {
21
6
  tag: 'Users Controller',
22
7
  description: 'Manage users, change their status, reset traffic, etc.',
@@ -137,4 +122,19 @@ exports.CONTROLLERS_INFO = {
137
122
  description: 'Manage arbitrary metadata for Users and Nodes.',
138
123
  resource: 'metadata',
139
124
  },
125
+ AUTH: {
126
+ tag: 'Auth Controller',
127
+ description: 'Used to authenticate admin users.',
128
+ resource: 'auth',
129
+ },
130
+ PASSKEYS: {
131
+ tag: 'Passkeys Controller',
132
+ description: 'Management of Passkeys.',
133
+ resource: 'passkeys',
134
+ },
135
+ API_TOKENS: {
136
+ tag: 'API Tokens Controller',
137
+ description: "Manage API tokens to use in your code. This controller can't be used with API token, only with Admin JWT token",
138
+ resource: 'api-tokens',
139
+ },
140
140
  };