@remnawave/backend-contract 2.9.14 → 2.9.21

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 (274) 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/remnawave-settings.d.ts +2 -2
  17. package/build/backend/api/controllers/remnawave-settings.d.ts.map +1 -1
  18. package/build/backend/api/controllers/remnawave-settings.js +3 -3
  19. package/build/backend/api/controllers/subscriptions.d.ts +2 -2
  20. package/build/backend/api/controllers/subscriptions.d.ts.map +1 -1
  21. package/build/backend/api/controllers/subscriptions.js +2 -2
  22. package/build/backend/api/controllers/users.d.ts +9 -13
  23. package/build/backend/api/controllers/users.d.ts.map +1 -1
  24. package/build/backend/api/controllers/users.js +9 -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 +24 -25
  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 +1 -1
  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/remnawave-settings/get-remnawave-settings.command.js +1 -1
  93. package/build/backend/commands/remnawave-settings/update-remnawave-settings.command.js +1 -1
  94. 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
  95. package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.d.ts.map +1 -0
  96. package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.js +23 -0
  97. package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts +0 -1
  98. package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -1
  99. package/build/backend/commands/subscriptions/get-by/{get-subscription-by-uuid.command.d.ts → get-subscription-by-user-id.command.d.ts} +4 -4
  100. package/build/backend/commands/subscriptions/get-by/get-subscription-by-user-id.command.d.ts.map +1 -0
  101. package/build/backend/commands/subscriptions/get-by/get-subscription-by-user-id.command.js +19 -0
  102. package/build/backend/commands/subscriptions/get-by/index.d.ts +2 -2
  103. package/build/backend/commands/subscriptions/get-by/index.d.ts.map +1 -1
  104. package/build/backend/commands/subscriptions/get-by/index.js +2 -2
  105. package/build/backend/commands/users/actions/disable-user.command.d.ts +2 -3
  106. package/build/backend/commands/users/actions/disable-user.command.d.ts.map +1 -1
  107. package/build/backend/commands/users/actions/disable-user.command.js +4 -3
  108. package/build/backend/commands/users/actions/enable-user.command.d.ts +2 -3
  109. package/build/backend/commands/users/actions/enable-user.command.d.ts.map +1 -1
  110. package/build/backend/commands/users/actions/enable-user.command.js +4 -3
  111. package/build/backend/commands/users/{get-by/get-user-by-id.command.d.ts → actions/extend-user.command.d.ts} +8 -5
  112. package/build/backend/commands/users/actions/extend-user.command.d.ts.map +1 -0
  113. package/build/backend/commands/users/actions/extend-user.command.js +21 -0
  114. package/build/backend/commands/users/actions/index.d.ts +1 -0
  115. package/build/backend/commands/users/actions/index.d.ts.map +1 -1
  116. package/build/backend/commands/users/actions/index.js +1 -0
  117. package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts +2 -3
  118. package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts.map +1 -1
  119. package/build/backend/commands/users/actions/reset-user-traffic.command.js +4 -3
  120. package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts +2 -3
  121. package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts.map +1 -1
  122. package/build/backend/commands/users/actions/revoke-user-subscription.command.js +4 -3
  123. package/build/backend/commands/users/bulk/bulk-delete-users.command.d.ts +1 -1
  124. package/build/backend/commands/users/bulk/bulk-delete-users.command.js +2 -2
  125. package/build/backend/commands/users/bulk/bulk-extend-expiration-date.command.d.ts +1 -1
  126. package/build/backend/commands/users/bulk/bulk-extend-expiration-date.command.js +1 -1
  127. package/build/backend/commands/users/bulk/bulk-reset-traffic-users.command.d.ts +1 -1
  128. package/build/backend/commands/users/bulk/bulk-reset-traffic-users.command.js +2 -2
  129. package/build/backend/commands/users/bulk/bulk-revoke-users-subscription.command.d.ts +1 -1
  130. package/build/backend/commands/users/bulk/bulk-revoke-users-subscription.command.js +2 -2
  131. package/build/backend/commands/users/bulk/bulk-update-users-squads.command.d.ts +1 -1
  132. package/build/backend/commands/users/bulk/bulk-update-users-squads.command.js +2 -2
  133. package/build/backend/commands/users/bulk/bulk-update-users.command.d.ts +1 -1
  134. package/build/backend/commands/users/bulk/bulk-update-users.command.js +2 -2
  135. package/build/backend/commands/users/create-user.command.d.ts +0 -2
  136. package/build/backend/commands/users/create-user.command.d.ts.map +1 -1
  137. package/build/backend/commands/users/create-user.command.js +0 -3
  138. package/build/backend/commands/users/delete-user.command.d.ts +2 -2
  139. package/build/backend/commands/users/delete-user.command.d.ts.map +1 -1
  140. package/build/backend/commands/users/delete-user.command.js +4 -3
  141. package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts +0 -1
  142. package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts.map +1 -1
  143. package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts +0 -1
  144. package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts.map +1 -1
  145. package/build/backend/commands/users/get-by/index.d.ts +0 -1
  146. package/build/backend/commands/users/get-by/index.d.ts.map +1 -1
  147. package/build/backend/commands/users/get-by/index.js +0 -1
  148. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +3 -3
  149. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts.map +1 -1
  150. package/build/backend/commands/users/get-user-accessible-nodes.command.js +5 -4
  151. package/build/backend/commands/users/{get-user-by-uuid.command.d.ts → get-user-by-id.command.d.ts} +4 -5
  152. package/build/backend/commands/users/get-user-by-id.command.d.ts.map +1 -0
  153. package/build/backend/commands/users/{get-by/get-user-by-id.command.js → get-user-by-id.command.js} +8 -7
  154. package/build/backend/commands/users/get-user-subscription-request-history.command.d.ts +2 -2
  155. package/build/backend/commands/users/get-user-subscription-request-history.command.d.ts.map +1 -1
  156. package/build/backend/commands/users/get-user-subscription-request-history.command.js +5 -5
  157. package/build/backend/commands/users/get-users-stream.command.d.ts +0 -1
  158. package/build/backend/commands/users/get-users-stream.command.d.ts.map +1 -1
  159. package/build/backend/commands/users/get-users.command.d.ts +0 -1
  160. package/build/backend/commands/users/get-users.command.d.ts.map +1 -1
  161. package/build/backend/commands/users/index.d.ts +1 -1
  162. package/build/backend/commands/users/index.d.ts.map +1 -1
  163. package/build/backend/commands/users/index.js +1 -1
  164. package/build/backend/commands/users/resolve-user.command.d.ts +2 -2
  165. package/build/backend/commands/users/resolve-user.command.d.ts.map +1 -1
  166. package/build/backend/commands/users/resolve-user.command.js +5 -5
  167. package/build/backend/commands/users/update-user.command.d.ts +1 -2
  168. package/build/backend/commands/users/update-user.command.d.ts.map +1 -1
  169. package/build/backend/commands/users/update-user.command.js +4 -6
  170. package/build/backend/commands/users/user.response.d.ts +0 -1
  171. package/build/backend/commands/users/user.response.d.ts.map +1 -1
  172. package/build/backend/constants/errors/errors.d.ts +18 -8
  173. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  174. package/build/backend/constants/errors/errors.js +18 -8
  175. package/build/backend/models/extended-users.schema.d.ts +0 -1
  176. package/build/backend/models/extended-users.schema.d.ts.map +1 -1
  177. package/build/backend/models/index.d.ts +1 -0
  178. package/build/backend/models/index.d.ts.map +1 -1
  179. package/build/backend/models/index.js +1 -0
  180. package/build/backend/models/path-params.schema.d.ts +3 -0
  181. package/build/backend/models/path-params.schema.d.ts.map +1 -0
  182. package/build/backend/models/path-params.schema.js +5 -0
  183. package/build/backend/models/torrent-blocker-report.schema.d.ts +0 -1
  184. package/build/backend/models/torrent-blocker-report.schema.d.ts.map +1 -1
  185. package/build/backend/models/torrent-blocker-report.schema.js +0 -1
  186. package/build/backend/models/users.schema.d.ts +0 -1
  187. package/build/backend/models/users.schema.d.ts.map +1 -1
  188. package/build/backend/models/users.schema.js +0 -1
  189. package/build/backend/models/webhook/webhook.schema.d.ts +0 -6
  190. package/build/backend/models/webhook/webhook.schema.d.ts.map +1 -1
  191. package/build/frontend/api/controllers/bandwidth-stats.js +8 -20
  192. package/build/frontend/api/controllers/connections.js +1 -1
  193. package/build/frontend/api/controllers/hwid.js +1 -1
  194. package/build/frontend/api/controllers/internal-squads.js +2 -0
  195. package/build/frontend/api/controllers/metadata.js +4 -4
  196. package/build/frontend/api/controllers/remnawave-settings.js +3 -3
  197. package/build/frontend/api/controllers/subscriptions.js +2 -2
  198. package/build/frontend/api/controllers/users.js +9 -13
  199. package/build/frontend/api/controllers-info.js +15 -15
  200. package/build/frontend/api/routes.js +24 -25
  201. package/build/frontend/commands/bandwidth-stats/index.js +1 -1
  202. package/build/frontend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.js +50 -0
  203. package/build/frontend/commands/bandwidth-stats/internal-squads/get-internal-squad-user-usage.command.js +34 -0
  204. package/build/frontend/commands/bandwidth-stats/{legacy → internal-squads}/index.js +2 -2
  205. package/build/frontend/commands/bandwidth-stats/nodes/get-node-usage.command.js +38 -0
  206. package/build/frontend/commands/bandwidth-stats/nodes/index.js +1 -0
  207. package/build/frontend/commands/bandwidth-stats/users/get-stats-user-usage.command.js +5 -4
  208. package/build/frontend/commands/connections/connections-by-node-result.command.js +1 -1
  209. package/build/frontend/commands/connections/connections-by-user-result.command.js +1 -2
  210. package/build/frontend/commands/connections/connections-by-user.command.js +4 -3
  211. package/build/frontend/commands/connections/drop-connections.command.js +3 -3
  212. package/build/frontend/commands/hwid/create-user-hwid-device.command.js +1 -1
  213. package/build/frontend/commands/hwid/delete-all-user-hwid-devices.command.js +1 -1
  214. package/build/frontend/commands/hwid/delete-user-hwid-device.command.js +1 -1
  215. package/build/frontend/commands/hwid/get-top-users-by-hwid-devices.command.js +0 -1
  216. package/build/frontend/commands/hwid/get-user-hwid-devices.command.js +3 -3
  217. package/build/frontend/commands/internal-squads/bulk-actions/add-many-users-to-internal-squad.command.js +18 -0
  218. package/build/frontend/commands/internal-squads/bulk-actions/delete-many-users-from-internal-squad.command.js +18 -0
  219. package/build/frontend/commands/internal-squads/bulk-actions/index.js +2 -0
  220. package/build/frontend/commands/metadata/user/get-user-metadata.command.js +4 -3
  221. package/build/frontend/commands/metadata/user/upsert-user-metadata.command.js +3 -3
  222. package/build/frontend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.js +1 -1
  223. package/build/frontend/commands/remnawave-settings/get-remnawave-settings.command.js +1 -1
  224. package/build/frontend/commands/remnawave-settings/update-remnawave-settings.command.js +1 -1
  225. package/build/frontend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.js +23 -0
  226. package/build/frontend/commands/subscriptions/get-by/get-subscription-by-user-id.command.js +19 -0
  227. package/build/frontend/commands/subscriptions/get-by/index.js +2 -2
  228. package/build/frontend/commands/users/actions/disable-user.command.js +4 -3
  229. package/build/frontend/commands/users/actions/enable-user.command.js +4 -3
  230. package/build/frontend/commands/users/actions/extend-user.command.js +21 -0
  231. package/build/frontend/commands/users/actions/index.js +1 -0
  232. package/build/frontend/commands/users/actions/reset-user-traffic.command.js +4 -3
  233. package/build/frontend/commands/users/actions/revoke-user-subscription.command.js +4 -3
  234. package/build/frontend/commands/users/bulk/bulk-delete-users.command.js +2 -2
  235. package/build/frontend/commands/users/bulk/bulk-extend-expiration-date.command.js +1 -1
  236. package/build/frontend/commands/users/bulk/bulk-reset-traffic-users.command.js +2 -2
  237. package/build/frontend/commands/users/bulk/bulk-revoke-users-subscription.command.js +2 -2
  238. package/build/frontend/commands/users/bulk/bulk-update-users-squads.command.js +2 -2
  239. package/build/frontend/commands/users/bulk/bulk-update-users.command.js +2 -2
  240. package/build/frontend/commands/users/create-user.command.js +0 -3
  241. package/build/frontend/commands/users/delete-user.command.js +4 -3
  242. package/build/frontend/commands/users/get-by/index.js +0 -1
  243. package/build/frontend/commands/users/get-user-accessible-nodes.command.js +5 -4
  244. package/build/frontend/commands/users/{get-by/get-user-by-id.command.js → get-user-by-id.command.js} +8 -7
  245. package/build/frontend/commands/users/get-user-subscription-request-history.command.js +5 -5
  246. package/build/frontend/commands/users/index.js +1 -1
  247. package/build/frontend/commands/users/resolve-user.command.js +5 -5
  248. package/build/frontend/commands/users/update-user.command.js +4 -6
  249. package/build/frontend/constants/errors/errors.js +18 -8
  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.map +0 -1
  268. package/build/backend/commands/users/get-user-by-uuid.command.d.ts.map +0 -1
  269. package/build/backend/commands/users/get-user-by-uuid.command.js +0 -17
  270. package/build/frontend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.js +0 -28
  271. package/build/frontend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.js +0 -29
  272. package/build/frontend/commands/subscriptions/get-by/get-connection-keys-by-uuid.command.js +0 -22
  273. package/build/frontend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +0 -19
  274. package/build/frontend/commands/users/get-user-by-uuid.command.js +0 -17
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,qCAAqC,CAAC;AAEpD,cAAc,4BAA4B,CAAC;AAE3C,cAAc,iDAAiD,CAAC;AAChE,cAAc,4BAA4B,CAAC;AAE3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,qCAAqC,CAAC;AAEpD,cAAc,0BAA0B,CAAC;AAEzC,cAAc,iDAAiD,CAAC;AAChE,cAAc,4BAA4B,CAAC;AAE3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC"}
@@ -22,7 +22,7 @@ __exportStar(require("./delete-user.command"), exports);
22
22
  __exportStar(require("./get-users.command"), exports);
23
23
  __exportStar(require("./get-by"), exports);
24
24
  __exportStar(require("./get-user-accessible-nodes.command"), exports);
25
- __exportStar(require("./get-user-by-uuid.command"), exports);
25
+ __exportStar(require("./get-user-by-id.command"), exports);
26
26
  __exportStar(require("./get-user-subscription-request-history.command"), exports);
27
27
  __exportStar(require("./get-users-stream.command"), exports);
28
28
  __exportStar(require("./resolve-user.command"), exports);
@@ -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"}
@@ -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";
@@ -969,12 +964,12 @@ export declare const ERRORS: {
969
964
  readonly message: "Passkey not found";
970
965
  readonly httpCode: 404;
971
966
  };
972
- readonly GET_REMNAAWAVE_SETTINGS_ERROR: {
967
+ readonly GET_REMNAWAVE_SETTINGS_ERROR: {
973
968
  readonly code: "A192";
974
969
  readonly message: "Get Remnawave settings error";
975
970
  readonly httpCode: 500;
976
971
  };
977
- readonly UPDATE_REMNAAWAVE_SETTINGS_ERROR: {
972
+ readonly UPDATE_REMNAWAVE_SETTINGS_ERROR: {
978
973
  readonly code: "A193";
979
974
  readonly message: "Update Remnawave settings error";
980
975
  readonly httpCode: 500;
@@ -1009,7 +1004,7 @@ export declare const ERRORS: {
1009
1004
  readonly message: "Delete passkey error";
1010
1005
  readonly httpCode: 500;
1011
1006
  };
1012
- readonly VALIDATE_REMNAAWAVE_SETTINGS_ERROR: {
1007
+ readonly VALIDATE_REMNAWAVE_SETTINGS_ERROR: {
1013
1008
  readonly code: "A199";
1014
1009
  readonly message: "Validate Remnawave settings error";
1015
1010
  readonly httpCode: 500;
@@ -1189,5 +1184,20 @@ export declare const ERRORS: {
1189
1184
  httpCode: number;
1190
1185
  };
1191
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
+ };
1192
1202
  };
1193
1203
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAsqBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA0KN,MAAM;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAC"}
@@ -455,11 +455,6 @@ exports.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',
@@ -940,12 +935,12 @@ exports.ERRORS = {
940
935
  message: 'Passkey not found',
941
936
  httpCode: 404,
942
937
  },
943
- GET_REMNAAWAVE_SETTINGS_ERROR: {
938
+ GET_REMNAWAVE_SETTINGS_ERROR: {
944
939
  code: 'A192',
945
940
  message: 'Get Remnawave settings error',
946
941
  httpCode: 500,
947
942
  },
948
- UPDATE_REMNAAWAVE_SETTINGS_ERROR: {
943
+ UPDATE_REMNAWAVE_SETTINGS_ERROR: {
949
944
  code: 'A193',
950
945
  message: 'Update Remnawave settings error',
951
946
  httpCode: 500,
@@ -980,7 +975,7 @@ exports.ERRORS = {
980
975
  message: 'Delete passkey error',
981
976
  httpCode: 500,
982
977
  },
983
- VALIDATE_REMNAAWAVE_SETTINGS_ERROR: {
978
+ VALIDATE_REMNAWAVE_SETTINGS_ERROR: {
984
979
  code: 'A199',
985
980
  message: 'Validate Remnawave settings error',
986
981
  httpCode: 500,
@@ -1160,4 +1155,19 @@ exports.ERRORS = {
1160
1155
  httpCode: 500,
1161
1156
  }),
1162
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
+ },
1163
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;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,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;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -49,3 +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.ts","sourceRoot":"","sources":["../../../../models/webhook/webhook.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAOpB,eAAO,MAAM,0BAA0B;;;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AC,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
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REMNAAWAVE_SETTINGS_ROUTES = exports.REMNAAWAVE_SETTINGS_CONTROLLER = void 0;
4
- exports.REMNAAWAVE_SETTINGS_CONTROLLER = 'remnawave-settings';
5
- exports.REMNAAWAVE_SETTINGS_ROUTES = {
3
+ exports.REMNAWAVE_SETTINGS_ROUTES = exports.REMNAWAVE_SETTINGS_CONTROLLER = void 0;
4
+ exports.REMNAWAVE_SETTINGS_CONTROLLER = 'remnawave-settings';
5
+ exports.REMNAWAVE_SETTINGS_ROUTES = {
6
6
  GET: '', // get
7
7
  UPDATE: '', // patch
8
8
  };
@@ -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
  };
@@ -8,24 +8,20 @@ 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
+ EXTEND_EXPIRATION_DATE: (userId) => `${userId}/${exports.USERS_ACTIONS_ROUTE}/extend`,
20
21
  },
21
22
  GET_BY: {
22
- ID: (id) => `by-id/${id}`,
23
23
  SHORT_UUID: (shortUuid) => `by-short-uuid/${shortUuid}`,
24
24
  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
25
  },
30
26
  BULK: {
31
27
  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
  };