@remnawave/backend-contract 2.0.0-alpha.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/build/backend/api/controllers/auth.d.ts +2 -0
  2. package/build/backend/api/controllers/auth.d.ts.map +1 -1
  3. package/build/backend/api/controllers/auth.js +2 -0
  4. package/build/backend/api/controllers/index.d.ts +1 -0
  5. package/build/backend/api/controllers/index.d.ts.map +1 -1
  6. package/build/backend/api/controllers/index.js +1 -0
  7. package/build/backend/api/controllers/infra-billing.d.ts +16 -0
  8. package/build/backend/api/controllers/infra-billing.d.ts.map +1 -0
  9. package/build/backend/api/controllers/infra-billing.js +18 -0
  10. package/build/backend/api/controllers/internal-squads.d.ts +4 -0
  11. package/build/backend/api/controllers/internal-squads.d.ts.map +1 -1
  12. package/build/backend/api/controllers/internal-squads.js +5 -0
  13. package/build/backend/api/controllers/subscription.d.ts +1 -0
  14. package/build/backend/api/controllers/subscription.d.ts.map +1 -1
  15. package/build/backend/api/controllers/subscription.js +1 -0
  16. package/build/backend/api/controllers/system.d.ts +1 -0
  17. package/build/backend/api/controllers/system.d.ts.map +1 -1
  18. package/build/backend/api/controllers/system.js +1 -0
  19. package/build/backend/api/routes.d.ts +22 -0
  20. package/build/backend/api/routes.d.ts.map +1 -1
  21. package/build/backend/api/routes.js +22 -0
  22. package/build/backend/commands/api-tokens/create.command.d.ts +0 -3
  23. package/build/backend/commands/api-tokens/create.command.d.ts.map +1 -1
  24. package/build/backend/commands/api-tokens/create.command.js +0 -1
  25. package/build/backend/commands/api-tokens/find.command.d.ts +0 -7
  26. package/build/backend/commands/api-tokens/find.command.d.ts.map +1 -1
  27. package/build/backend/commands/auth/get-status.command.d.ts +23 -0
  28. package/build/backend/commands/auth/get-status.command.d.ts.map +1 -1
  29. package/build/backend/commands/auth/get-status.command.js +3 -0
  30. package/build/backend/commands/auth/oauth2/authorize.command.d.ts +36 -0
  31. package/build/backend/commands/auth/oauth2/authorize.command.d.ts.map +1 -0
  32. package/build/backend/commands/auth/oauth2/authorize.command.js +20 -0
  33. package/build/backend/commands/auth/oauth2/callback.command.d.ts +43 -0
  34. package/build/backend/commands/auth/oauth2/callback.command.d.ts.map +1 -0
  35. package/build/backend/commands/auth/oauth2/callback.command.js +22 -0
  36. package/build/backend/commands/auth/oauth2/index.d.ts +2 -0
  37. package/build/backend/commands/auth/oauth2/index.d.ts.map +1 -1
  38. package/build/backend/commands/auth/oauth2/index.js +2 -0
  39. package/build/backend/commands/config-profiles/create-config-profile.command.js +2 -2
  40. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts +31 -10
  41. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts.map +1 -1
  42. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +31 -10
  43. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -1
  44. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +31 -10
  45. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -1
  46. package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts +31 -10
  47. package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts.map +1 -1
  48. package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts +31 -10
  49. package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts.map +1 -1
  50. package/build/backend/commands/hosts/create.command.d.ts +52 -19
  51. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  52. package/build/backend/commands/hosts/create.command.js +13 -13
  53. package/build/backend/commands/hosts/get-all.command.d.ts +31 -10
  54. package/build/backend/commands/hosts/get-all.command.d.ts.map +1 -1
  55. package/build/backend/commands/hosts/get-one.command.d.ts +31 -10
  56. package/build/backend/commands/hosts/get-one.command.d.ts.map +1 -1
  57. package/build/backend/commands/hosts/reorder.command.d.ts +11 -2
  58. package/build/backend/commands/hosts/reorder.command.d.ts.map +1 -1
  59. package/build/backend/commands/hosts/update.command.d.ts +63 -21
  60. package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
  61. package/build/backend/commands/hosts/update.command.js +10 -11
  62. package/build/backend/commands/index.d.ts +1 -0
  63. package/build/backend/commands/index.d.ts.map +1 -1
  64. package/build/backend/commands/index.js +1 -0
  65. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts +125 -0
  66. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts.map +1 -0
  67. package/build/backend/commands/infra-billing/create-bill-record.command.js +30 -0
  68. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +467 -0
  69. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -0
  70. package/build/backend/commands/infra-billing/create-billing-node.command.js +38 -0
  71. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +123 -0
  72. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts.map +1 -0
  73. package/build/backend/commands/infra-billing/create-infra-provider.command.js +24 -0
  74. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts +119 -0
  75. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts.map +1 -0
  76. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  77. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +461 -0
  78. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -0
  79. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  80. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts +33 -0
  81. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts.map +1 -0
  82. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  83. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts +122 -0
  84. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts.map +1 -0
  85. package/build/backend/commands/infra-billing/get-bill-records.command.js +31 -0
  86. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +453 -0
  87. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts.map +1 -0
  88. package/build/backend/commands/infra-billing/get-billing-nodes.command.js +26 -0
  89. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +117 -0
  90. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts.map +1 -0
  91. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  92. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +156 -0
  93. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts.map +1 -0
  94. package/build/backend/commands/infra-billing/get-infra-providers.command.js +19 -0
  95. package/build/backend/commands/infra-billing/index.d.ts +13 -0
  96. package/build/backend/commands/infra-billing/index.d.ts.map +1 -0
  97. package/build/backend/commands/infra-billing/index.js +28 -0
  98. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +464 -0
  99. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -0
  100. package/build/backend/commands/infra-billing/update-billing-node.command.js +35 -0
  101. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +126 -0
  102. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts.map +1 -0
  103. package/build/backend/commands/infra-billing/update-infra-provider.command.js +26 -0
  104. package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.d.ts +33 -0
  105. package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.d.ts.map +1 -0
  106. package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js +20 -0
  107. package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.d.ts +33 -0
  108. package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.d.ts.map +1 -0
  109. package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.js +20 -0
  110. package/build/backend/commands/internal-squads/bulk-actions/index.d.ts +3 -0
  111. package/build/backend/commands/internal-squads/bulk-actions/index.d.ts.map +1 -0
  112. package/build/backend/commands/internal-squads/bulk-actions/index.js +18 -0
  113. package/build/backend/commands/internal-squads/create-internal-squad.command.js +2 -2
  114. package/build/backend/commands/internal-squads/{get-internal-squad-by-uuid..d.ts → get-internal-squad-by-uuid.d.ts} +1 -1
  115. package/build/backend/commands/internal-squads/get-internal-squad-by-uuid.d.ts.map +1 -0
  116. package/build/backend/commands/internal-squads/index.d.ts +2 -1
  117. package/build/backend/commands/internal-squads/index.d.ts.map +1 -1
  118. package/build/backend/commands/internal-squads/index.js +2 -1
  119. package/build/backend/commands/nodes/actions/disable.command.d.ts +166 -68
  120. package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
  121. package/build/backend/commands/nodes/actions/enable.command.d.ts +166 -68
  122. package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
  123. package/build/backend/commands/nodes/actions/reorder.command.d.ts +240 -92
  124. package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
  125. package/build/backend/commands/nodes/create.command.d.ts +187 -74
  126. package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
  127. package/build/backend/commands/nodes/create.command.js +7 -4
  128. package/build/backend/commands/nodes/get-all.command.d.ts +166 -68
  129. package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
  130. package/build/backend/commands/nodes/get-one.command.d.ts +166 -68
  131. package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
  132. package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.d.ts +4 -4
  133. package/build/backend/commands/nodes/stats/get-nodes-usage-by-range.command.d.ts +4 -4
  134. package/build/backend/commands/nodes/update.command.d.ts +261 -98
  135. package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
  136. package/build/backend/commands/nodes/update.command.js +9 -4
  137. package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.d.ts +354 -0
  138. package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -0
  139. package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.js +67 -0
  140. package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts +4 -4
  141. package/build/backend/commands/subscription/index.d.ts +1 -0
  142. package/build/backend/commands/subscription/index.d.ts.map +1 -1
  143. package/build/backend/commands/subscription/index.js +1 -0
  144. package/build/backend/commands/subscriptions/get-all-subscriptions.command.d.ts +6 -6
  145. package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.d.ts +4 -4
  146. package/build/backend/commands/system/get-nodes-metrics.command.d.ts +153 -0
  147. package/build/backend/commands/system/get-nodes-metrics.command.d.ts.map +1 -0
  148. package/build/backend/commands/system/get-nodes-metrics.command.js +33 -0
  149. package/build/backend/commands/system/index.d.ts +1 -0
  150. package/build/backend/commands/system/index.d.ts.map +1 -1
  151. package/build/backend/commands/system/index.js +1 -0
  152. package/build/backend/commands/users/create-user.command.d.ts +6 -6
  153. package/build/backend/commands/users/create-user.command.d.ts.map +1 -1
  154. package/build/backend/commands/users/create-user.command.js +2 -4
  155. package/build/backend/commands/users/get-user-usage-by-range.command.d.ts +4 -4
  156. package/build/backend/constants/errors/errors.d.ts +115 -0
  157. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  158. package/build/backend/constants/errors/errors.js +115 -0
  159. package/build/backend/constants/events/events.d.ts +11 -0
  160. package/build/backend/constants/events/events.d.ts.map +1 -1
  161. package/build/backend/constants/events/events.js +10 -0
  162. package/build/backend/constants/headers/headers.constants.d.ts +3 -0
  163. package/build/backend/constants/headers/headers.constants.d.ts.map +1 -0
  164. package/build/backend/constants/headers/headers.constants.js +5 -0
  165. package/build/backend/constants/headers/index.d.ts +2 -0
  166. package/build/backend/constants/headers/index.d.ts.map +1 -0
  167. package/build/backend/constants/headers/index.js +17 -0
  168. package/build/backend/constants/index.d.ts +3 -0
  169. package/build/backend/constants/index.d.ts.map +1 -1
  170. package/build/backend/constants/index.js +3 -0
  171. package/build/backend/constants/messaging/index.d.ts +2 -0
  172. package/build/backend/constants/messaging/index.d.ts.map +1 -0
  173. package/build/backend/constants/messaging/index.js +17 -0
  174. package/build/backend/constants/messaging/messaging.constants.d.ts +13 -0
  175. package/build/backend/constants/messaging/messaging.constants.d.ts.map +1 -0
  176. package/build/backend/constants/messaging/messaging.constants.js +19 -0
  177. package/build/backend/constants/metrics/metric-names.constant.d.ts +17 -0
  178. package/build/backend/constants/metrics/metric-names.constant.d.ts.map +1 -1
  179. package/build/backend/constants/metrics/metric-names.constant.js +17 -0
  180. package/build/backend/constants/oauth2/index.d.ts +2 -0
  181. package/build/backend/constants/oauth2/index.d.ts.map +1 -0
  182. package/build/backend/constants/oauth2/index.js +17 -0
  183. package/build/backend/constants/oauth2/providers.contants.d.ts +9 -0
  184. package/build/backend/constants/oauth2/providers.contants.d.ts.map +1 -0
  185. package/build/backend/constants/oauth2/providers.contants.js +9 -0
  186. package/build/backend/constants/templates/template-keys.d.ts +1 -1
  187. package/build/backend/constants/templates/template-keys.d.ts.map +1 -1
  188. package/build/backend/constants/templates/template-keys.js +1 -0
  189. package/build/backend/models/api-tokens.schema.d.ts +0 -3
  190. package/build/backend/models/api-tokens.schema.d.ts.map +1 -1
  191. package/build/backend/models/api-tokens.schema.js +0 -1
  192. package/build/backend/models/{extented-users.schema.d.ts → extended-users.schema.d.ts} +1 -1
  193. package/build/backend/models/{extented-users.schema.d.ts.map → extended-users.schema.d.ts.map} +1 -1
  194. package/build/backend/models/hosts.schema.d.ts +21 -6
  195. package/build/backend/models/hosts.schema.d.ts.map +1 -1
  196. package/build/backend/models/hosts.schema.js +5 -2
  197. package/build/backend/models/index.d.ts +5 -1
  198. package/build/backend/models/index.d.ts.map +1 -1
  199. package/build/backend/models/index.js +5 -1
  200. package/build/backend/models/infra-billing-available-node.schema.d.ts +117 -0
  201. package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -0
  202. package/build/backend/models/infra-billing-available-node.schema.js +9 -0
  203. package/build/backend/models/infra-billing-history-record.schema.d.ts +44 -0
  204. package/build/backend/models/infra-billing-history-record.schema.d.ts.map +1 -0
  205. package/build/backend/models/infra-billing-history-record.schema.js +19 -0
  206. package/build/backend/models/infra-billing-node.schema.d.ts +180 -0
  207. package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -0
  208. package/build/backend/models/infra-billing-node.schema.js +34 -0
  209. package/build/backend/models/infra-provider.schema.d.ts +87 -0
  210. package/build/backend/models/infra-provider.schema.d.ts.map +1 -0
  211. package/build/backend/models/infra-provider.schema.js +41 -0
  212. package/build/backend/models/nodes.schema.d.ts +120 -46
  213. package/build/backend/models/nodes.schema.d.ts.map +1 -1
  214. package/build/backend/models/nodes.schema.js +8 -2
  215. package/build/frontend/api/controllers/auth.js +2 -0
  216. package/build/frontend/api/controllers/index.js +1 -0
  217. package/build/frontend/api/controllers/infra-billing.js +18 -0
  218. package/build/frontend/api/controllers/internal-squads.js +5 -0
  219. package/build/frontend/api/controllers/subscription.js +1 -0
  220. package/build/frontend/api/controllers/system.js +1 -0
  221. package/build/frontend/api/routes.js +22 -0
  222. package/build/frontend/commands/api-tokens/create.command.js +0 -1
  223. package/build/frontend/commands/auth/get-status.command.js +3 -0
  224. package/build/frontend/commands/auth/oauth2/authorize.command.js +20 -0
  225. package/build/frontend/commands/auth/oauth2/callback.command.js +22 -0
  226. package/build/frontend/commands/auth/oauth2/index.js +2 -0
  227. package/build/frontend/commands/config-profiles/create-config-profile.command.js +2 -2
  228. package/build/frontend/commands/hosts/create.command.js +13 -13
  229. package/build/frontend/commands/hosts/update.command.js +10 -11
  230. package/build/frontend/commands/index.js +1 -0
  231. package/build/frontend/commands/infra-billing/create-bill-record.command.js +30 -0
  232. package/build/frontend/commands/infra-billing/create-billing-node.command.js +38 -0
  233. package/build/frontend/commands/infra-billing/create-infra-provider.command.js +24 -0
  234. package/build/frontend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  235. package/build/frontend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  236. package/build/frontend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  237. package/build/frontend/commands/infra-billing/get-bill-records.command.js +31 -0
  238. package/build/frontend/commands/infra-billing/get-billing-nodes.command.js +26 -0
  239. package/build/frontend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  240. package/build/frontend/commands/infra-billing/get-infra-providers.command.js +19 -0
  241. package/build/frontend/commands/infra-billing/index.js +28 -0
  242. package/build/frontend/commands/infra-billing/update-billing-node.command.js +35 -0
  243. package/build/frontend/commands/infra-billing/update-infra-provider.command.js +26 -0
  244. package/build/frontend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js +20 -0
  245. package/build/frontend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.js +20 -0
  246. package/build/frontend/commands/internal-squads/bulk-actions/index.js +18 -0
  247. package/build/frontend/commands/internal-squads/create-internal-squad.command.js +2 -2
  248. package/build/frontend/commands/internal-squads/index.js +2 -1
  249. package/build/frontend/commands/nodes/create.command.js +7 -4
  250. package/build/frontend/commands/nodes/update.command.js +9 -4
  251. package/build/frontend/commands/subscription/get-raw-subscription-by-short-uuid.command.js +67 -0
  252. package/build/frontend/commands/subscription/index.js +1 -0
  253. package/build/frontend/commands/system/get-nodes-metrics.command.js +33 -0
  254. package/build/frontend/commands/system/index.js +1 -0
  255. package/build/frontend/commands/users/create-user.command.js +2 -4
  256. package/build/frontend/constants/errors/errors.js +115 -0
  257. package/build/frontend/constants/events/events.js +10 -0
  258. package/build/frontend/constants/headers/headers.constants.js +5 -0
  259. package/build/frontend/constants/headers/index.js +17 -0
  260. package/build/frontend/constants/index.js +3 -0
  261. package/build/frontend/constants/messaging/index.js +17 -0
  262. package/build/frontend/constants/messaging/messaging.constants.js +19 -0
  263. package/build/frontend/constants/metrics/metric-names.constant.js +17 -0
  264. package/build/frontend/constants/oauth2/index.js +17 -0
  265. package/build/frontend/constants/oauth2/providers.contants.js +9 -0
  266. package/build/frontend/constants/templates/template-keys.js +1 -0
  267. package/build/frontend/models/api-tokens.schema.js +0 -1
  268. package/build/frontend/models/hosts.schema.js +5 -2
  269. package/build/frontend/models/index.js +5 -1
  270. package/build/frontend/models/infra-billing-available-node.schema.js +9 -0
  271. package/build/frontend/models/infra-billing-history-record.schema.js +19 -0
  272. package/build/frontend/models/infra-billing-node.schema.js +34 -0
  273. package/build/frontend/models/infra-provider.schema.js +41 -0
  274. package/build/frontend/models/nodes.schema.js +8 -2
  275. package/package.json +2 -2
  276. package/build/backend/commands/internal-squads/get-internal-squad-by-uuid..d.ts.map +0 -1
  277. /package/build/backend/commands/internal-squads/{get-internal-squad-by-uuid..js → get-internal-squad-by-uuid.js} +0 -0
  278. /package/build/backend/models/{extented-users.schema.js → extended-users.schema.js} +0 -0
  279. /package/build/frontend/commands/internal-squads/{get-internal-squad-by-uuid..js → get-internal-squad-by-uuid.js} +0 -0
  280. /package/build/frontend/models/{extented-users.schema.js → extended-users.schema.js} +0 -0
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteUsersFromInternalSquadCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../../api");
6
+ const constants_1 = require("../../../constants");
7
+ var DeleteUsersFromInternalSquadCommand;
8
+ (function (DeleteUsersFromInternalSquadCommand) {
9
+ DeleteUsersFromInternalSquadCommand.url = api_1.REST_API.INTERNAL_SQUADS.BULK_ACTIONS.REMOVE_USERS;
10
+ DeleteUsersFromInternalSquadCommand.TSQ_url = DeleteUsersFromInternalSquadCommand.url(':uuid');
11
+ DeleteUsersFromInternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(':uuid'), 'delete', 'Delete users from internal squad');
12
+ DeleteUsersFromInternalSquadCommand.RequestSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ });
15
+ DeleteUsersFromInternalSquadCommand.ResponseSchema = zod_1.z.object({
16
+ response: zod_1.z.object({
17
+ eventSent: zod_1.z.boolean(),
18
+ }),
19
+ });
20
+ })(DeleteUsersFromInternalSquadCommand || (exports.DeleteUsersFromInternalSquadCommand = DeleteUsersFromInternalSquadCommand = {}));
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./add-users-to-internal-squad.command"), exports);
18
+ __exportStar(require("./delete-users-from-internal-squad.command"), exports);
@@ -13,8 +13,8 @@ var CreateInternalSquadCommand;
13
13
  CreateInternalSquadCommand.RequestSchema = zod_1.z.object({
14
14
  name: zod_1.z
15
15
  .string()
16
- .min(6, 'Name must be at least 6 characters')
17
- .max(16, 'Name must be less than 16 characters')
16
+ .min(2, 'Name must be at least 2 characters')
17
+ .max(20, 'Name must be less than 20 characters')
18
18
  .regex(/^[A-Za-z0-9_-]+$/, 'Name can only contain letters, numbers, underscores and dashes'),
19
19
  inbounds: zod_1.z.array(zod_1.z.string().uuid()),
20
20
  });
@@ -14,8 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./bulk-actions"), exports);
17
18
  __exportStar(require("./create-internal-squad.command"), exports);
18
19
  __exportStar(require("./delete-internal-squad.command"), exports);
19
- __exportStar(require("./get-internal-squad-by-uuid."), exports);
20
+ __exportStar(require("./get-internal-squad-by-uuid"), exports);
20
21
  __exportStar(require("./get-internal-squads.command"), exports);
21
22
  __exportStar(require("./update-internal-squad.command"), exports);
@@ -35,10 +35,13 @@ var CreateNodeCommand;
35
35
  .number()
36
36
  .min(0.1, 'Consumption multiplier must be greater than 0')
37
37
  .transform((n) => Number(n.toFixed(1)))),
38
- activeConfigProfileUuid: zod_1.z.optional(zod_1.z.string().uuid()),
39
- activeInbounds: zod_1.z.optional(zod_1.z.array(zod_1.z.string().uuid(), {
40
- invalid_type_error: 'Active inbounds must be an array of UUIDs',
41
- })),
38
+ configProfile: zod_1.z.object({
39
+ activeConfigProfileUuid: zod_1.z.string().uuid(),
40
+ activeInbounds: zod_1.z.array(zod_1.z.string().uuid(), {
41
+ invalid_type_error: 'Config profile inbound UUID must be an array of UUIDs',
42
+ }),
43
+ }),
44
+ providerUuid: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().uuid())),
42
45
  });
43
46
  CreateNodeCommand.ResponseSchema = zod_1.z.object({
44
47
  response: models_1.NodesSchema,
@@ -31,10 +31,15 @@ var UpdateNodeCommand;
31
31
  .number()
32
32
  .min(0.1, 'Consumption multiplier must be greater than 0')
33
33
  .transform((n) => Number(n.toFixed(1)))),
34
- activeConfigProfileUuid: zod_1.z.optional(zod_1.z.string().uuid()),
35
- activeInbounds: zod_1.z.optional(zod_1.z.array(zod_1.z.string().uuid(), {
36
- invalid_type_error: 'Active inbounds must be an array of UUIDs',
37
- })),
34
+ configProfile: zod_1.z
35
+ .object({
36
+ activeConfigProfileUuid: zod_1.z.string().uuid(),
37
+ activeInbounds: zod_1.z.array(zod_1.z.string().uuid(), {
38
+ invalid_type_error: 'Must be an array of UUIDs',
39
+ }),
40
+ })
41
+ .optional(),
42
+ providerUuid: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().uuid())),
38
43
  });
39
44
  UpdateNodeCommand.ResponseSchema = zod_1.z.object({
40
45
  response: models_1.NodesSchema,
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRawSubscriptionByShortUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const api_1 = require("../../api");
7
+ const constants_2 = require("../../constants");
8
+ var GetRawSubscriptionByShortUuidCommand;
9
+ (function (GetRawSubscriptionByShortUuidCommand) {
10
+ GetRawSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_RAW;
11
+ GetRawSubscriptionByShortUuidCommand.TSQ_url = GetRawSubscriptionByShortUuidCommand.url(':shortUuid');
12
+ GetRawSubscriptionByShortUuidCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_ROUTES.GET_RAW(':shortUuid'), 'get', 'Get Raw Subscription by Short UUID');
13
+ GetRawSubscriptionByShortUuidCommand.RequestSchema = zod_1.z.object({
14
+ shortUuid: zod_1.z.string(),
15
+ });
16
+ GetRawSubscriptionByShortUuidCommand.ResponseSchema = zod_1.z.object({
17
+ response: zod_1.z.object({
18
+ user: zod_1.z.object({
19
+ shortUuid: zod_1.z.string(),
20
+ daysLeft: zod_1.z.number(),
21
+ trafficUsed: zod_1.z.string(),
22
+ trafficLimit: zod_1.z.string(),
23
+ username: zod_1.z.string(),
24
+ expiresAt: zod_1.z
25
+ .string()
26
+ .datetime()
27
+ .transform((str) => new Date(str)),
28
+ isActive: zod_1.z.boolean(),
29
+ userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
30
+ trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
31
+ }),
32
+ subscriptionUrl: zod_1.z.string(),
33
+ rawHosts: zod_1.z.array(zod_1.z.object({
34
+ address: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
35
+ alpn: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
36
+ fingerprint: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
37
+ host: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
38
+ network: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
39
+ password: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
40
+ path: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
41
+ publicKey: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
42
+ port: zod_1.z.optional(zod_1.z.nullable(zod_1.z.number())),
43
+ protocol: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
44
+ remark: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
45
+ shortId: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
46
+ sni: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
47
+ spiderX: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
48
+ tls: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
49
+ headerType: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
50
+ additionalParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
51
+ mode: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
52
+ heartbeatPeriod: zod_1.z.optional(zod_1.z.nullable(zod_1.z.number())),
53
+ }))),
54
+ xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({}))),
55
+ serverDescription: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
56
+ flow: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
57
+ protocolOptions: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
58
+ ss: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
59
+ method: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
60
+ }))),
61
+ }))),
62
+ })),
63
+ headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
64
+ isHwidLimited: zod_1.z.boolean(),
65
+ }),
66
+ });
67
+ })(GetRawSubscriptionByShortUuidCommand || (exports.GetRawSubscriptionByShortUuidCommand = GetRawSubscriptionByShortUuidCommand = {}));
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-outline-subscription-by-short-uuid.command"), exports);
18
+ __exportStar(require("./get-raw-subscription-by-short-uuid.command"), exports);
18
19
  __exportStar(require("./get-subscription-by-short-uuid-by-client-type.command"), exports);
19
20
  __exportStar(require("./get-subscription-by-short-uuid.command"), exports);
20
21
  __exportStar(require("./get-subscription-info-by-short-uuid.command"), exports);
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetNodesMetricsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const api_1 = require("../../api");
7
+ var GetNodesMetricsCommand;
8
+ (function (GetNodesMetricsCommand) {
9
+ GetNodesMetricsCommand.url = api_1.REST_API.SYSTEM.STATS.NODES_METRICS;
10
+ GetNodesMetricsCommand.TSQ_url = GetNodesMetricsCommand.url;
11
+ GetNodesMetricsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.STATS.NODES_METRICS, 'get', 'Get Nodes Metrics');
12
+ GetNodesMetricsCommand.ResponseSchema = zod_1.z.object({
13
+ response: zod_1.z.object({
14
+ nodes: zod_1.z.array(zod_1.z.object({
15
+ nodeUuid: zod_1.z.string(),
16
+ nodeName: zod_1.z.string(),
17
+ countryEmoji: zod_1.z.string(),
18
+ providerName: zod_1.z.string(),
19
+ usersOnline: zod_1.z.number(),
20
+ inboundsStats: zod_1.z.array(zod_1.z.object({
21
+ tag: zod_1.z.string(),
22
+ upload: zod_1.z.string(),
23
+ download: zod_1.z.string(),
24
+ })),
25
+ outboundsStats: zod_1.z.array(zod_1.z.object({
26
+ tag: zod_1.z.string(),
27
+ upload: zod_1.z.string(),
28
+ download: zod_1.z.string(),
29
+ })),
30
+ })),
31
+ }),
32
+ });
33
+ })(GetNodesMetricsCommand || (exports.GetNodesMetricsCommand = GetNodesMetricsCommand = {}));
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-bandwidth-stats.command"), exports);
18
+ __exportStar(require("./get-nodes-metrics.command"), exports);
18
19
  __exportStar(require("./get-nodes-statistics"), exports);
19
20
  __exportStar(require("./get-remnawave-health.command"), exports);
20
21
  __exportStar(require("./get-stats.command"), exports);
@@ -110,12 +110,10 @@ var CreateUserCommand;
110
110
  .nullable())
111
111
  .describe('Optional. User tag for categorization. Max 16 characters, uppercase letters, numbers and underscores only.'),
112
112
  telegramId: zod_1.z
113
- .optional(zod_1.z.number().int())
113
+ .optional(zod_1.z.number().int().nullable())
114
114
  .describe('Optional. Telegram user ID for notifications. Must be an integer.'),
115
115
  email: zod_1.z
116
- .string()
117
- .email('Invalid email format')
118
- .optional()
116
+ .optional(zod_1.z.string().email('Invalid email format').nullable())
119
117
  .describe('Optional. User email address. Must be a valid email format.'),
120
118
  hwidDeviceLimit: zod_1.z.optional(zod_1.z
121
119
  .number({ invalid_type_error: 'Device limit must be a number' })
@@ -625,4 +625,119 @@ exports.ERRORS = {
625
625
  message: 'Get user accessible nodes error',
626
626
  httpCode: 500,
627
627
  },
628
+ GET_INFRA_PROVIDERS_ERROR: {
629
+ code: 'A126',
630
+ message: 'Get infra providers error',
631
+ httpCode: 500,
632
+ },
633
+ GET_INFRA_PROVIDER_BY_UUID_ERROR: {
634
+ code: 'A127',
635
+ message: 'Get infra provider by UUID error',
636
+ httpCode: 500,
637
+ },
638
+ INFRA_PROVIDER_NOT_FOUND: {
639
+ code: 'A128',
640
+ message: 'Infra provider not found',
641
+ httpCode: 404,
642
+ },
643
+ DELETE_INFRA_PROVIDER_BY_UUID_ERROR: {
644
+ code: 'A129',
645
+ message: 'Delete infra provider by UUID error',
646
+ httpCode: 500,
647
+ },
648
+ CREATE_INFRA_PROVIDER_ERROR: {
649
+ code: 'A130',
650
+ message: 'Create infra provider error',
651
+ httpCode: 500,
652
+ },
653
+ UPDATE_INFRA_PROVIDER_ERROR: {
654
+ code: 'A131',
655
+ message: 'Update infra provider error',
656
+ httpCode: 500,
657
+ },
658
+ CREATE_INFRA_BILLING_HISTORY_RECORD_ERROR: {
659
+ code: 'A132',
660
+ message: 'Create infra billing history record error',
661
+ httpCode: 500,
662
+ },
663
+ GET_INFRA_BILLING_HISTORY_RECORDS_ERROR: {
664
+ code: 'A133',
665
+ message: 'Get infra billing history records error',
666
+ httpCode: 500,
667
+ },
668
+ DELETE_INFRA_BILLING_HISTORY_RECORD_BY_UUID_ERROR: {
669
+ code: 'A134',
670
+ message: 'Delete infra billing history record by UUID error',
671
+ httpCode: 500,
672
+ },
673
+ GET_BILLING_NODES_ERROR: {
674
+ code: 'A135',
675
+ message: 'Get billing nodes error',
676
+ httpCode: 500,
677
+ },
678
+ UPDATE_INFRA_BILLING_NODE_ERROR: {
679
+ code: 'A136',
680
+ message: 'Update infra billing node error',
681
+ httpCode: 500,
682
+ },
683
+ CREATE_INFRA_BILLING_NODE_ERROR: {
684
+ code: 'A137',
685
+ message: 'Create infra billing node error',
686
+ httpCode: 500,
687
+ },
688
+ DELETE_INFRA_BILLING_NODE_BY_UUID_ERROR: {
689
+ code: 'A138',
690
+ message: 'Delete infra billing node by UUID error',
691
+ httpCode: 500,
692
+ },
693
+ GET_BILLING_NODES_FOR_NOTIFICATIONS_ERROR: {
694
+ code: 'A139',
695
+ message: 'Get billing nodes for notifications error',
696
+ httpCode: 500,
697
+ },
698
+ ADD_USERS_TO_INTERNAL_SQUAD_ERROR: {
699
+ code: 'A140',
700
+ message: 'Add users to internal squad error',
701
+ httpCode: 500,
702
+ },
703
+ INTERNAL_SQUAD_BULK_ACTIONS_ERROR: {
704
+ code: 'A141',
705
+ message: 'Internal squad bulk actions error',
706
+ httpCode: 500,
707
+ },
708
+ REMOVE_USERS_FROM_INTERNAL_SQUAD_ERROR: {
709
+ code: 'A142',
710
+ message: 'Remove users from internal squad error',
711
+ httpCode: 500,
712
+ },
713
+ DELETE_CONFIG_PROFILE_BY_UUID_ERROR: {
714
+ code: 'A143',
715
+ message: 'Delete config profile by UUID error',
716
+ httpCode: 500,
717
+ },
718
+ RESERVED_INTERNAL_SQUAD_NAME: {
719
+ code: 'A144',
720
+ message: 'This name is reserved by Remnawave. Please use a different name.',
721
+ httpCode: 400,
722
+ },
723
+ RESERVED_CONFIG_PROFILE_NAME: {
724
+ code: 'A145',
725
+ message: 'This name is reserved by Remnawave. Please use a different name.',
726
+ httpCode: 400,
727
+ },
728
+ UPDATE_CONFIG_PROFILE_ERROR: {
729
+ code: 'A146',
730
+ message: 'Update config profile error',
731
+ httpCode: 500,
732
+ },
733
+ OAUTH2_PROVIDER_NOT_FOUND: {
734
+ code: 'A147',
735
+ message: 'OAuth2 provider not found',
736
+ httpCode: 404,
737
+ },
738
+ OAUTH2_AUTHORIZE_ERROR: {
739
+ code: 'A148',
740
+ message: 'OAuth2 authorize error',
741
+ httpCode: 500,
742
+ },
628
743
  };
@@ -39,8 +39,18 @@ exports.EVENTS = {
39
39
  ERRORS: {
40
40
  BANDWIDTH_USAGE_THRESHOLD_REACHED_MAX_NOTIFICATIONS: 'errors.bandwidth_usage_threshold_reached_max_notifications',
41
41
  },
42
+ CRM: {
43
+ INFRA_BILLING_NODE_PAYMENT_IN_7_DAYS: 'crm.infra_billing_node_payment_in_7_days',
44
+ INFRA_BILLING_NODE_PAYMENT_IN_48HRS: 'crm.infra_billing_node_payment_in_48hrs',
45
+ INFRA_BILLING_NODE_PAYMENT_IN_24HRS: 'crm.infra_billing_node_payment_in_24hrs',
46
+ INFRA_BILLING_NODE_PAYMENT_DUE_TODAY: 'crm.infra_billing_node_payment_due_today',
47
+ INFRA_BILLING_NODE_PAYMENT_OVERDUE_24HRS: 'crm.infra_billing_node_payment_overdue_24hrs',
48
+ INFRA_BILLING_NODE_PAYMENT_OVERDUE_48HRS: 'crm.infra_billing_node_payment_overdue_48hrs',
49
+ INFRA_BILLING_NODE_PAYMENT_OVERDUE_7_DAYS: 'crm.infra_billing_node_payment_overdue_7_days',
50
+ },
42
51
  CATCH_ALL_USER_EVENTS: 'user.*',
43
52
  CATCH_ALL_NODE_EVENTS: 'node.*',
44
53
  CATCH_ALL_SERVICE_EVENTS: 'service.*',
45
54
  CATCH_ALL_ERRORS_EVENTS: 'errors.*',
55
+ CATCH_ALL_CRM_EVENTS: 'crm.*',
46
56
  };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REMNAWAVE_CLIENT_TYPE_BROWSER = exports.REMNAWAVE_CLIENT_TYPE_HEADER = void 0;
4
+ exports.REMNAWAVE_CLIENT_TYPE_HEADER = 'X-Remnawave-Client-Type';
5
+ exports.REMNAWAVE_CLIENT_TYPE_BROWSER = 'browser';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./headers.constants"), exports);
@@ -17,9 +17,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./endpoint-details"), exports);
18
18
  __exportStar(require("./errors"), exports);
19
19
  __exportStar(require("./events"), exports);
20
+ __exportStar(require("./headers"), exports);
20
21
  __exportStar(require("./hosts"), exports);
22
+ __exportStar(require("./messaging"), exports);
21
23
  __exportStar(require("./metrics"), exports);
22
24
  __exportStar(require("./nodes"), exports);
25
+ __exportStar(require("./oauth2"), exports);
23
26
  __exportStar(require("./roles"), exports);
24
27
  __exportStar(require("./subscription-template"), exports);
25
28
  __exportStar(require("./templates"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./messaging.constants"), exports);
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessagingMessages = exports.MessagingQueues = exports.MessagingBuses = exports.MessagingChannels = void 0;
4
+ var MessagingChannels;
5
+ (function (MessagingChannels) {
6
+ MessagingChannels["EVENT"] = "redis-event";
7
+ })(MessagingChannels || (exports.MessagingChannels = MessagingChannels = {}));
8
+ var MessagingBuses;
9
+ (function (MessagingBuses) {
10
+ MessagingBuses["EVENT"] = "event.bus";
11
+ })(MessagingBuses || (exports.MessagingBuses = MessagingBuses = {}));
12
+ var MessagingQueues;
13
+ (function (MessagingQueues) {
14
+ MessagingQueues["EVENT"] = "event-queue";
15
+ })(MessagingQueues || (exports.MessagingQueues = MessagingQueues = {}));
16
+ var MessagingMessages;
17
+ (function (MessagingMessages) {
18
+ MessagingMessages["NODE_METRICS"] = "node.metrics";
19
+ })(MessagingMessages || (exports.MessagingMessages = MessagingMessages = {}));
@@ -5,5 +5,22 @@ exports.METRIC_NAMES = {
5
5
  NODE_ONLINE_USERS: 'node_online_users',
6
6
  NODE_STATUS: 'node_status',
7
7
  USERS_STATUS: 'users_status',
8
+ USERS_ONLINE_STATS: 'users_online_stats',
8
9
  USERS_TOTAL: 'users_total',
10
+ NODE_INBOUND_UPLOAD_BYTES: 'node_inbound_upload_bytes',
11
+ NODE_INBOUND_DOWNLOAD_BYTES: 'node_inbound_download_bytes',
12
+ NODE_OUTBOUND_UPLOAD_BYTES: 'node_outbound_upload_bytes',
13
+ NODE_OUTBOUND_DOWNLOAD_BYTES: 'node_outbound_download_bytes',
14
+ NODEJS_HEAP_USED_BYTES: 'nodejs_heap_used_bytes',
15
+ NODEJS_HEAP_TOTAL_BYTES: 'nodejs_heap_total_bytes',
16
+ NODEJS_HEAP_USAGE_PERCENT: 'nodejs_heap_usage_percent',
17
+ NODEJS_ACTIVE_HANDLERS: 'nodejs_active_handlers',
18
+ NODEJS_ACTIVE_REQUESTS: 'nodejs_active_requests',
19
+ NODEJS_CPU_USAGE_PERCENT: 'nodejs_cpu_usage_percent',
20
+ NODEJS_MEMORY_USAGE_BYTES: 'nodejs_memory_usage_bytes',
21
+ NODEJS_EVENT_LOOP_LATENCY_P50: 'nodejs_event_loop_latency_p50',
22
+ NODEJS_EVENT_LOOP_LATENCY_P95: 'nodejs_event_loop_latency_p95',
23
+ NODEJS_HTTP_REQ_RATE: 'nodejs_http_req_rate',
24
+ NODEJS_HTTP_REQ_LATENCY_P95: 'nodejs_http_req_latency_p95',
25
+ NODEJS_HTTP_REQ_LATENCY_P50: 'nodejs_http_req_latency_p50',
9
26
  };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./providers.contants"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OAUTH2_PROVIDERS_VALUES = exports.OAUTH2_PROVIDERS = void 0;
4
+ exports.OAUTH2_PROVIDERS = {
5
+ GITHUB: 'github',
6
+ POCKETID: 'pocketid',
7
+ YANDEX: 'yandex',
8
+ };
9
+ exports.OAUTH2_PROVIDERS_VALUES = Object.values(exports.OAUTH2_PROVIDERS);
@@ -11,4 +11,5 @@ exports.TEMPLATE_KEYS = [
11
11
  'EMAIL',
12
12
  'TELEGRAM_ID',
13
13
  'SUBSCRIPTION_URL',
14
+ 'TAG',
14
15
  ];
@@ -6,7 +6,6 @@ exports.ApiTokensSchema = zod_1.z.object({
6
6
  uuid: zod_1.z.string().uuid(),
7
7
  token: zod_1.z.string(),
8
8
  tokenName: zod_1.z.string(),
9
- tokenDescription: zod_1.z.nullable(zod_1.z.string()),
10
9
  createdAt: zod_1.z
11
10
  .string()
12
11
  .datetime()
@@ -17,6 +17,9 @@ exports.HostsSchema = zod_1.z.object({
17
17
  isDisabled: zod_1.z.boolean().default(false),
18
18
  securityLayer: zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS).default(hosts_1.SECURITY_LAYERS.DEFAULT),
19
19
  xHttpExtraParams: zod_1.z.nullable(zod_1.z.unknown()),
20
- configProfileUuid: zod_1.z.string().uuid().nullable(),
21
- configProfileInboundUuid: zod_1.z.string().uuid().nullable(),
20
+ inbound: zod_1.z.object({
21
+ configProfileUuid: zod_1.z.string().uuid().nullable(),
22
+ configProfileInboundUuid: zod_1.z.string().uuid().nullable(),
23
+ }),
24
+ serverDescription: zod_1.z.string().nullable(),
22
25
  });
@@ -20,10 +20,14 @@ __exportStar(require("./base-internal-squad.schema"), exports);
20
20
  __exportStar(require("./base-stat.schema"), exports);
21
21
  __exportStar(require("./config-profile-inbounds.schema"), exports);
22
22
  __exportStar(require("./config-profile.schema"), exports);
23
- __exportStar(require("./extented-users.schema"), exports);
23
+ __exportStar(require("./extended-users.schema"), exports);
24
24
  __exportStar(require("./happ.schema"), exports);
25
25
  __exportStar(require("./hosts.schema"), exports);
26
26
  __exportStar(require("./hwid-user-device.schema"), exports);
27
+ __exportStar(require("./infra-billing-available-node.schema"), exports);
28
+ __exportStar(require("./infra-billing-history-record.schema"), exports);
29
+ __exportStar(require("./infra-billing-node.schema"), exports);
30
+ __exportStar(require("./infra-provider.schema"), exports);
27
31
  __exportStar(require("./internal-squad.schema"), exports);
28
32
  __exportStar(require("./last-connected-node.schema"), exports);
29
33
  __exportStar(require("./nodes.schema"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InfraBillingAvailableNodeSchema = void 0;
4
+ const nodes_schema_1 = require("./nodes.schema");
5
+ exports.InfraBillingAvailableNodeSchema = nodes_schema_1.NodesSchema.pick({
6
+ uuid: true,
7
+ name: true,
8
+ countryCode: true,
9
+ });
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InfraBillingHistoryRecordSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const infra_provider_schema_1 = require("./infra-provider.schema");
6
+ exports.InfraBillingHistoryRecordSchema = zod_1.z.object({
7
+ uuid: zod_1.z.string().uuid(),
8
+ providerUuid: zod_1.z.string().uuid(),
9
+ amount: zod_1.z.number(),
10
+ billedAt: zod_1.z
11
+ .string()
12
+ .datetime()
13
+ .transform((str) => new Date(str)),
14
+ provider: infra_provider_schema_1.PartialInfraProviderSchema.omit({
15
+ createdAt: true,
16
+ updatedAt: true,
17
+ loginUrl: true,
18
+ }),
19
+ });
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InfraBillingNodeSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const infra_provider_schema_1 = require("./infra-provider.schema");
6
+ const nodes_schema_1 = require("./nodes.schema");
7
+ exports.InfraBillingNodeSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ nodeUuid: zod_1.z.string().uuid(),
10
+ providerUuid: zod_1.z.string().uuid(),
11
+ provider: infra_provider_schema_1.PartialInfraProviderSchema.pick({
12
+ uuid: true,
13
+ name: true,
14
+ loginUrl: true,
15
+ faviconLink: true,
16
+ }),
17
+ node: nodes_schema_1.NodesSchema.pick({
18
+ uuid: true,
19
+ name: true,
20
+ countryCode: true,
21
+ }),
22
+ nextBillingAt: zod_1.z
23
+ .string()
24
+ .datetime()
25
+ .transform((str) => new Date(str)),
26
+ createdAt: zod_1.z
27
+ .string()
28
+ .datetime()
29
+ .transform((str) => new Date(str)),
30
+ updatedAt: zod_1.z
31
+ .string()
32
+ .datetime()
33
+ .transform((str) => new Date(str)),
34
+ });