@remnawave/backend-contract 2.0.0-alpha.3 → 2.0.0-alpha.31

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 (223) hide show
  1. package/build/backend/api/controllers/index.d.ts +1 -0
  2. package/build/backend/api/controllers/index.d.ts.map +1 -1
  3. package/build/backend/api/controllers/index.js +1 -0
  4. package/build/backend/api/controllers/infra-billing.d.ts +16 -0
  5. package/build/backend/api/controllers/infra-billing.d.ts.map +1 -0
  6. package/build/backend/api/controllers/infra-billing.js +18 -0
  7. package/build/backend/api/controllers/internal-squads.d.ts +4 -0
  8. package/build/backend/api/controllers/internal-squads.d.ts.map +1 -1
  9. package/build/backend/api/controllers/internal-squads.js +5 -0
  10. package/build/backend/api/controllers/users.d.ts +1 -0
  11. package/build/backend/api/controllers/users.d.ts.map +1 -1
  12. package/build/backend/api/controllers/users.js +1 -0
  13. package/build/backend/api/routes.d.ts +19 -0
  14. package/build/backend/api/routes.d.ts.map +1 -1
  15. package/build/backend/api/routes.js +19 -0
  16. package/build/backend/commands/config-profiles/create-config-profile.command.js +2 -2
  17. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts +31 -10
  18. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts.map +1 -1
  19. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +31 -10
  20. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -1
  21. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +31 -10
  22. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -1
  23. package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts +31 -10
  24. package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts.map +1 -1
  25. package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts +31 -10
  26. package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts.map +1 -1
  27. package/build/backend/commands/hosts/create.command.d.ts +52 -19
  28. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  29. package/build/backend/commands/hosts/create.command.js +13 -13
  30. package/build/backend/commands/hosts/get-all.command.d.ts +31 -10
  31. package/build/backend/commands/hosts/get-all.command.d.ts.map +1 -1
  32. package/build/backend/commands/hosts/get-one.command.d.ts +31 -10
  33. package/build/backend/commands/hosts/get-one.command.d.ts.map +1 -1
  34. package/build/backend/commands/hosts/reorder.command.d.ts +11 -2
  35. package/build/backend/commands/hosts/reorder.command.d.ts.map +1 -1
  36. package/build/backend/commands/hosts/update.command.d.ts +63 -21
  37. package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
  38. package/build/backend/commands/hosts/update.command.js +10 -11
  39. package/build/backend/commands/index.d.ts +1 -0
  40. package/build/backend/commands/index.d.ts.map +1 -1
  41. package/build/backend/commands/index.js +1 -0
  42. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts +125 -0
  43. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts.map +1 -0
  44. package/build/backend/commands/infra-billing/create-bill-record.command.js +30 -0
  45. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +467 -0
  46. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -0
  47. package/build/backend/commands/infra-billing/create-billing-node.command.js +38 -0
  48. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +123 -0
  49. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts.map +1 -0
  50. package/build/backend/commands/infra-billing/create-infra-provider.command.js +24 -0
  51. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts +119 -0
  52. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts.map +1 -0
  53. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  54. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +461 -0
  55. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -0
  56. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  57. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts +33 -0
  58. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts.map +1 -0
  59. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  60. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts +122 -0
  61. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts.map +1 -0
  62. package/build/backend/commands/infra-billing/get-bill-records.command.js +31 -0
  63. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +453 -0
  64. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts.map +1 -0
  65. package/build/backend/commands/infra-billing/get-billing-nodes.command.js +26 -0
  66. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +117 -0
  67. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts.map +1 -0
  68. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  69. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +156 -0
  70. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts.map +1 -0
  71. package/build/backend/commands/infra-billing/get-infra-providers.command.js +19 -0
  72. package/build/backend/commands/infra-billing/index.d.ts +13 -0
  73. package/build/backend/commands/infra-billing/index.d.ts.map +1 -0
  74. package/build/backend/commands/infra-billing/index.js +28 -0
  75. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +464 -0
  76. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -0
  77. package/build/backend/commands/infra-billing/update-billing-node.command.js +35 -0
  78. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +126 -0
  79. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts.map +1 -0
  80. package/build/backend/commands/infra-billing/update-infra-provider.command.js +26 -0
  81. package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.d.ts +33 -0
  82. package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.d.ts.map +1 -0
  83. package/build/backend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js +20 -0
  84. package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.d.ts +33 -0
  85. package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.d.ts.map +1 -0
  86. package/build/backend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.js +20 -0
  87. package/build/backend/commands/internal-squads/bulk-actions/index.d.ts +3 -0
  88. package/build/backend/commands/internal-squads/bulk-actions/index.d.ts.map +1 -0
  89. package/build/backend/commands/internal-squads/bulk-actions/index.js +18 -0
  90. package/build/backend/commands/internal-squads/create-internal-squad.command.js +2 -2
  91. package/build/backend/commands/internal-squads/{get-internal-squad-by-uuid..d.ts → get-internal-squad-by-uuid.d.ts} +1 -1
  92. package/build/backend/commands/internal-squads/get-internal-squad-by-uuid.d.ts.map +1 -0
  93. package/build/backend/commands/internal-squads/index.d.ts +2 -1
  94. package/build/backend/commands/internal-squads/index.d.ts.map +1 -1
  95. package/build/backend/commands/internal-squads/index.js +2 -1
  96. package/build/backend/commands/nodes/actions/disable.command.d.ts +162 -64
  97. package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
  98. package/build/backend/commands/nodes/actions/enable.command.d.ts +162 -64
  99. package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
  100. package/build/backend/commands/nodes/actions/reorder.command.d.ts +236 -88
  101. package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
  102. package/build/backend/commands/nodes/create.command.d.ts +183 -70
  103. package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
  104. package/build/backend/commands/nodes/create.command.js +7 -4
  105. package/build/backend/commands/nodes/get-all.command.d.ts +162 -64
  106. package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
  107. package/build/backend/commands/nodes/get-one.command.d.ts +162 -64
  108. package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
  109. package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.d.ts +4 -4
  110. package/build/backend/commands/nodes/stats/get-nodes-usage-by-range.command.d.ts +4 -4
  111. package/build/backend/commands/nodes/update.command.d.ts +257 -94
  112. package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
  113. package/build/backend/commands/nodes/update.command.js +9 -4
  114. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +114 -0
  115. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts.map +1 -0
  116. package/build/backend/commands/users/get-user-accessible-nodes.command.js +31 -0
  117. package/build/backend/commands/users/get-user-usage-by-range.command.d.ts +4 -4
  118. package/build/backend/commands/users/index.d.ts +1 -0
  119. package/build/backend/commands/users/index.d.ts.map +1 -1
  120. package/build/backend/commands/users/index.js +1 -0
  121. package/build/backend/constants/errors/errors.d.ts +105 -0
  122. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  123. package/build/backend/constants/errors/errors.js +105 -0
  124. package/build/backend/constants/events/events.d.ts +11 -0
  125. package/build/backend/constants/events/events.d.ts.map +1 -1
  126. package/build/backend/constants/events/events.js +10 -0
  127. package/build/backend/constants/headers/headers.contants.d.ts +3 -0
  128. package/build/backend/constants/headers/headers.contants.d.ts.map +1 -0
  129. package/build/backend/constants/headers/headers.contants.js +5 -0
  130. package/build/backend/constants/headers/index.d.ts +2 -0
  131. package/build/backend/constants/headers/index.d.ts.map +1 -0
  132. package/build/backend/constants/headers/index.js +17 -0
  133. package/build/backend/constants/index.d.ts +2 -0
  134. package/build/backend/constants/index.d.ts.map +1 -1
  135. package/build/backend/constants/index.js +2 -0
  136. package/build/backend/constants/messaging/index.d.ts +2 -0
  137. package/build/backend/constants/messaging/index.d.ts.map +1 -0
  138. package/build/backend/constants/messaging/index.js +17 -0
  139. package/build/backend/constants/messaging/messaging.constants.d.ts +13 -0
  140. package/build/backend/constants/messaging/messaging.constants.d.ts.map +1 -0
  141. package/build/backend/constants/messaging/messaging.constants.js +19 -0
  142. package/build/backend/constants/metrics/metric-names.constant.d.ts +16 -0
  143. package/build/backend/constants/metrics/metric-names.constant.d.ts.map +1 -1
  144. package/build/backend/constants/metrics/metric-names.constant.js +16 -0
  145. package/build/backend/constants/templates/template-keys.d.ts +1 -1
  146. package/build/backend/constants/templates/template-keys.d.ts.map +1 -1
  147. package/build/backend/constants/templates/template-keys.js +1 -0
  148. package/build/backend/models/{extented-users.schema.d.ts → extended-users.schema.d.ts} +1 -1
  149. package/build/backend/models/{extented-users.schema.d.ts.map → extended-users.schema.d.ts.map} +1 -1
  150. package/build/backend/models/hosts.schema.d.ts +21 -6
  151. package/build/backend/models/hosts.schema.d.ts.map +1 -1
  152. package/build/backend/models/hosts.schema.js +5 -2
  153. package/build/backend/models/index.d.ts +5 -1
  154. package/build/backend/models/index.d.ts.map +1 -1
  155. package/build/backend/models/index.js +5 -1
  156. package/build/backend/models/infra-billing-available-node.schema.d.ts +117 -0
  157. package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -0
  158. package/build/backend/models/infra-billing-available-node.schema.js +9 -0
  159. package/build/backend/models/infra-billing-history-record.schema.d.ts +44 -0
  160. package/build/backend/models/infra-billing-history-record.schema.d.ts.map +1 -0
  161. package/build/backend/models/infra-billing-history-record.schema.js +19 -0
  162. package/build/backend/models/infra-billing-node.schema.d.ts +180 -0
  163. package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -0
  164. package/build/backend/models/infra-billing-node.schema.js +34 -0
  165. package/build/backend/models/infra-provider.schema.d.ts +87 -0
  166. package/build/backend/models/infra-provider.schema.d.ts.map +1 -0
  167. package/build/backend/models/infra-provider.schema.js +41 -0
  168. package/build/backend/models/nodes.schema.d.ts +118 -44
  169. package/build/backend/models/nodes.schema.d.ts.map +1 -1
  170. package/build/backend/models/nodes.schema.js +8 -2
  171. package/build/frontend/api/controllers/index.js +1 -0
  172. package/build/frontend/api/controllers/infra-billing.js +18 -0
  173. package/build/frontend/api/controllers/internal-squads.js +5 -0
  174. package/build/frontend/api/controllers/users.js +1 -0
  175. package/build/frontend/api/routes.js +19 -0
  176. package/build/frontend/commands/config-profiles/create-config-profile.command.js +2 -2
  177. package/build/frontend/commands/hosts/create.command.js +13 -13
  178. package/build/frontend/commands/hosts/update.command.js +10 -11
  179. package/build/frontend/commands/index.js +1 -0
  180. package/build/frontend/commands/infra-billing/create-bill-record.command.js +30 -0
  181. package/build/frontend/commands/infra-billing/create-billing-node.command.js +38 -0
  182. package/build/frontend/commands/infra-billing/create-infra-provider.command.js +24 -0
  183. package/build/frontend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  184. package/build/frontend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  185. package/build/frontend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  186. package/build/frontend/commands/infra-billing/get-bill-records.command.js +31 -0
  187. package/build/frontend/commands/infra-billing/get-billing-nodes.command.js +26 -0
  188. package/build/frontend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  189. package/build/frontend/commands/infra-billing/get-infra-providers.command.js +19 -0
  190. package/build/frontend/commands/infra-billing/index.js +28 -0
  191. package/build/frontend/commands/infra-billing/update-billing-node.command.js +35 -0
  192. package/build/frontend/commands/infra-billing/update-infra-provider.command.js +26 -0
  193. package/build/frontend/commands/internal-squads/bulk-actions/add-users-to-internal-squad.command.js +20 -0
  194. package/build/frontend/commands/internal-squads/bulk-actions/delete-users-from-internal-squad.command.js +20 -0
  195. package/build/frontend/commands/internal-squads/bulk-actions/index.js +18 -0
  196. package/build/frontend/commands/internal-squads/create-internal-squad.command.js +2 -2
  197. package/build/frontend/commands/internal-squads/index.js +2 -1
  198. package/build/frontend/commands/nodes/create.command.js +7 -4
  199. package/build/frontend/commands/nodes/update.command.js +9 -4
  200. package/build/frontend/commands/users/get-user-accessible-nodes.command.js +31 -0
  201. package/build/frontend/commands/users/index.js +1 -0
  202. package/build/frontend/constants/errors/errors.js +105 -0
  203. package/build/frontend/constants/events/events.js +10 -0
  204. package/build/frontend/constants/headers/headers.contants.js +5 -0
  205. package/build/frontend/constants/headers/index.js +17 -0
  206. package/build/frontend/constants/index.js +2 -0
  207. package/build/frontend/constants/messaging/index.js +17 -0
  208. package/build/frontend/constants/messaging/messaging.constants.js +19 -0
  209. package/build/frontend/constants/metrics/metric-names.constant.js +16 -0
  210. package/build/frontend/constants/templates/template-keys.js +1 -0
  211. package/build/frontend/models/hosts.schema.js +5 -2
  212. package/build/frontend/models/index.js +5 -1
  213. package/build/frontend/models/infra-billing-available-node.schema.js +9 -0
  214. package/build/frontend/models/infra-billing-history-record.schema.js +19 -0
  215. package/build/frontend/models/infra-billing-node.schema.js +34 -0
  216. package/build/frontend/models/infra-provider.schema.js +41 -0
  217. package/build/frontend/models/nodes.schema.js +8 -2
  218. package/package.json +2 -2
  219. package/build/backend/commands/internal-squads/get-internal-squad-by-uuid..d.ts.map +0 -1
  220. /package/build/backend/commands/internal-squads/{get-internal-squad-by-uuid..js → get-internal-squad-by-uuid.js} +0 -0
  221. /package/build/backend/models/{extented-users.schema.js → extended-users.schema.js} +0 -0
  222. /package/build/frontend/commands/internal-squads/{get-internal-squad-by-uuid..js → get-internal-squad-by-uuid.js} +0 -0
  223. /package/build/frontend/models/{extented-users.schema.js → extended-users.schema.js} +0 -0
@@ -12,6 +12,7 @@ export declare const NodesSchema: z.ZodObject<{
12
12
  lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
13
13
  lastStatusMessage: z.ZodNullable<z.ZodString>;
14
14
  xrayVersion: z.ZodNullable<z.ZodString>;
15
+ nodeVersion: z.ZodNullable<z.ZodString>;
15
16
  xrayUptime: z.ZodString;
16
17
  isTrafficTrackingActive: z.ZodBoolean;
17
18
  trafficResetDay: z.ZodNullable<z.ZodNumber>;
@@ -27,35 +28,84 @@ export declare const NodesSchema: z.ZodObject<{
27
28
  totalRam: z.ZodNullable<z.ZodString>;
28
29
  createdAt: z.ZodEffects<z.ZodString, Date, string>;
29
30
  updatedAt: z.ZodEffects<z.ZodString, Date, string>;
30
- activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
31
- activeInbounds: z.ZodNullable<z.ZodArray<z.ZodObject<{
31
+ configProfile: z.ZodObject<{
32
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
33
+ activeInbounds: z.ZodArray<z.ZodObject<{
34
+ uuid: z.ZodString;
35
+ profileUuid: z.ZodString;
36
+ tag: z.ZodString;
37
+ type: z.ZodString;
38
+ network: z.ZodNullable<z.ZodString>;
39
+ security: z.ZodNullable<z.ZodString>;
40
+ port: z.ZodNullable<z.ZodNumber>;
41
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ type: string;
44
+ uuid: string;
45
+ profileUuid: string;
46
+ tag: string;
47
+ network: string | null;
48
+ security: string | null;
49
+ port: number | null;
50
+ rawInbound?: unknown;
51
+ }, {
52
+ type: string;
53
+ uuid: string;
54
+ profileUuid: string;
55
+ tag: string;
56
+ network: string | null;
57
+ security: string | null;
58
+ port: number | null;
59
+ rawInbound?: unknown;
60
+ }>, "many">;
61
+ }, "strip", z.ZodTypeAny, {
62
+ activeConfigProfileUuid: string | null;
63
+ activeInbounds: {
64
+ type: string;
65
+ uuid: string;
66
+ profileUuid: string;
67
+ tag: string;
68
+ network: string | null;
69
+ security: string | null;
70
+ port: number | null;
71
+ rawInbound?: unknown;
72
+ }[];
73
+ }, {
74
+ activeConfigProfileUuid: string | null;
75
+ activeInbounds: {
76
+ type: string;
77
+ uuid: string;
78
+ profileUuid: string;
79
+ tag: string;
80
+ network: string | null;
81
+ security: string | null;
82
+ port: number | null;
83
+ rawInbound?: unknown;
84
+ }[];
85
+ }>;
86
+ providerUuid: z.ZodNullable<z.ZodString>;
87
+ provider: z.ZodNullable<z.ZodObject<{
32
88
  uuid: z.ZodString;
33
- profileUuid: z.ZodString;
34
- tag: z.ZodString;
35
- type: z.ZodString;
36
- network: z.ZodNullable<z.ZodString>;
37
- security: z.ZodNullable<z.ZodString>;
38
- port: z.ZodNullable<z.ZodNumber>;
39
- rawInbound: z.ZodNullable<z.ZodUnknown>;
89
+ name: z.ZodString;
90
+ faviconLink: z.ZodNullable<z.ZodString>;
91
+ loginUrl: z.ZodNullable<z.ZodString>;
92
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
93
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
40
94
  }, "strip", z.ZodTypeAny, {
41
- type: string;
42
95
  uuid: string;
43
- profileUuid: string;
44
- tag: string;
45
- network: string | null;
46
- security: string | null;
47
- port: number | null;
48
- rawInbound?: unknown;
96
+ createdAt: Date;
97
+ updatedAt: Date;
98
+ name: string;
99
+ faviconLink: string | null;
100
+ loginUrl: string | null;
49
101
  }, {
50
- type: string;
51
102
  uuid: string;
52
- profileUuid: string;
53
- tag: string;
54
- network: string | null;
55
- security: string | null;
56
- port: number | null;
57
- rawInbound?: unknown;
58
- }>, "many">>;
103
+ createdAt: string;
104
+ updatedAt: string;
105
+ name: string;
106
+ faviconLink: string | null;
107
+ loginUrl: string | null;
108
+ }>>;
59
109
  }, "strip", z.ZodTypeAny, {
60
110
  uuid: string;
61
111
  createdAt: Date;
@@ -74,6 +124,7 @@ export declare const NodesSchema: z.ZodObject<{
74
124
  lastStatusChange: Date | null;
75
125
  lastStatusMessage: string | null;
76
126
  xrayVersion: string | null;
127
+ nodeVersion: string | null;
77
128
  xrayUptime: string;
78
129
  isTrafficTrackingActive: boolean;
79
130
  trafficResetDay: number | null;
@@ -84,17 +135,28 @@ export declare const NodesSchema: z.ZodObject<{
84
135
  cpuCount: number | null;
85
136
  cpuModel: string | null;
86
137
  totalRam: string | null;
87
- activeConfigProfileUuid: string | null;
88
- activeInbounds: {
89
- type: string;
138
+ configProfile: {
139
+ activeConfigProfileUuid: string | null;
140
+ activeInbounds: {
141
+ type: string;
142
+ uuid: string;
143
+ profileUuid: string;
144
+ tag: string;
145
+ network: string | null;
146
+ security: string | null;
147
+ port: number | null;
148
+ rawInbound?: unknown;
149
+ }[];
150
+ };
151
+ providerUuid: string | null;
152
+ provider: {
90
153
  uuid: string;
91
- profileUuid: string;
92
- tag: string;
93
- network: string | null;
94
- security: string | null;
95
- port: number | null;
96
- rawInbound?: unknown;
97
- }[] | null;
154
+ createdAt: Date;
155
+ updatedAt: Date;
156
+ name: string;
157
+ faviconLink: string | null;
158
+ loginUrl: string | null;
159
+ } | null;
98
160
  }, {
99
161
  uuid: string;
100
162
  createdAt: string;
@@ -113,6 +175,7 @@ export declare const NodesSchema: z.ZodObject<{
113
175
  lastStatusChange: string | null;
114
176
  lastStatusMessage: string | null;
115
177
  xrayVersion: string | null;
178
+ nodeVersion: string | null;
116
179
  xrayUptime: string;
117
180
  isTrafficTrackingActive: boolean;
118
181
  trafficResetDay: number | null;
@@ -123,16 +186,27 @@ export declare const NodesSchema: z.ZodObject<{
123
186
  cpuCount: number | null;
124
187
  cpuModel: string | null;
125
188
  totalRam: string | null;
126
- activeConfigProfileUuid: string | null;
127
- activeInbounds: {
128
- type: string;
189
+ configProfile: {
190
+ activeConfigProfileUuid: string | null;
191
+ activeInbounds: {
192
+ type: string;
193
+ uuid: string;
194
+ profileUuid: string;
195
+ tag: string;
196
+ network: string | null;
197
+ security: string | null;
198
+ port: number | null;
199
+ rawInbound?: unknown;
200
+ }[];
201
+ };
202
+ providerUuid: string | null;
203
+ provider: {
129
204
  uuid: string;
130
- profileUuid: string;
131
- tag: string;
132
- network: string | null;
133
- security: string | null;
134
- port: number | null;
135
- rawInbound?: unknown;
136
- }[] | null;
205
+ createdAt: string;
206
+ updatedAt: string;
207
+ name: string;
208
+ faviconLink: string | null;
209
+ loginUrl: string | null;
210
+ } | null;
137
211
  }>;
138
212
  //# sourceMappingURL=nodes.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodes.schema.d.ts","sourceRoot":"","sources":["../../../models/nodes.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CtB,CAAC"}
1
+ {"version":3,"file":"nodes.schema.d.ts","sourceRoot":"","sources":["../../../models/nodes.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDtB,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodesSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const config_profile_inbounds_schema_1 = require("./config-profile-inbounds.schema");
6
+ const infra_provider_schema_1 = require("./infra-provider.schema");
6
7
  exports.NodesSchema = zod_1.z.object({
7
8
  uuid: zod_1.z.string().uuid(),
8
9
  name: zod_1.z.string(),
@@ -19,6 +20,7 @@ exports.NodesSchema = zod_1.z.object({
19
20
  .transform((str) => new Date(str))),
20
21
  lastStatusMessage: zod_1.z.nullable(zod_1.z.string()),
21
22
  xrayVersion: zod_1.z.nullable(zod_1.z.string()),
23
+ nodeVersion: zod_1.z.nullable(zod_1.z.string()),
22
24
  xrayUptime: zod_1.z.string(),
23
25
  isTrafficTrackingActive: zod_1.z.boolean(),
24
26
  trafficResetDay: zod_1.z.nullable(zod_1.z.number().int()),
@@ -40,6 +42,10 @@ exports.NodesSchema = zod_1.z.object({
40
42
  .string()
41
43
  .datetime()
42
44
  .transform((str) => new Date(str)),
43
- activeConfigProfileUuid: zod_1.z.nullable(zod_1.z.string().uuid()),
44
- activeInbounds: zod_1.z.nullable(zod_1.z.array(config_profile_inbounds_schema_1.ConfigProfileInboundsSchema)),
45
+ configProfile: zod_1.z.object({
46
+ activeConfigProfileUuid: zod_1.z.nullable(zod_1.z.string().uuid()),
47
+ activeInbounds: zod_1.z.array(config_profile_inbounds_schema_1.ConfigProfileInboundsSchema),
48
+ }),
49
+ providerUuid: zod_1.z.nullable(zod_1.z.string().uuid()),
50
+ provider: zod_1.z.nullable(infra_provider_schema_1.PartialInfraProviderSchema),
45
51
  });
@@ -19,6 +19,7 @@ __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./config-profiles"), exports);
20
20
  __exportStar(require("./hosts"), exports);
21
21
  __exportStar(require("./hwid"), exports);
22
+ __exportStar(require("./infra-billing"), exports);
22
23
  __exportStar(require("./internal-squads"), exports);
23
24
  __exportStar(require("./keygen"), exports);
24
25
  __exportStar(require("./nodes"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INFRA_BILLING_ROUTES = exports.INFRA_BILLING_CONTROLLER = void 0;
4
+ exports.INFRA_BILLING_CONTROLLER = 'infra-billing';
5
+ exports.INFRA_BILLING_ROUTES = {
6
+ GET_PROVIDERS: 'providers', // Get list of all providers // get
7
+ CREATE_PROVIDER: 'providers', // Create new provider // post
8
+ UPDATE_PROVIDER: 'providers', // Update provider by uuid // patch
9
+ DELETE_PROVIDER: (uuid) => `providers/${uuid}`, // Delete provider by uuid // delete
10
+ GET_PROVIDER_BY_UUID: (uuid) => `providers/${uuid}`, // Get provider by uuid // get
11
+ GET_BILLING_NODES: 'nodes', // Get list of all nodes billing // get
12
+ CREATE_BILLING_NODE: 'nodes', // Create new node billing // post
13
+ UPDATE_BILLING_NODE: 'nodes', // Update node billing by uuid // patch
14
+ DELETE_BILLING_NODE: (uuid) => `nodes/${uuid}`, // Delete node billing by uuid // delete
15
+ GET_BILLING_HISTORY: 'history', // Get list of all nodes billing history // get
16
+ CREATE_BILLING_HISTORY: 'history', // Create new node billing history // post
17
+ DELETE_BILLING_HISTORY: (uuid) => `history/${uuid}`, // Delete node billing history by uuid // delete
18
+ };
@@ -2,10 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.INTERNAL_SQUADS_ROUTES = exports.INTERNAL_SQUADS_CONTROLLER = void 0;
4
4
  exports.INTERNAL_SQUADS_CONTROLLER = 'internal-squads';
5
+ const BULK_ACTIONS_ROUTE = 'bulk-actions';
5
6
  exports.INTERNAL_SQUADS_ROUTES = {
6
7
  GET: '', // Get list of all internal squads // get
7
8
  CREATE: '', // Create new internal squad // post
8
9
  UPDATE: '', // Update internal squad by uuid // patch
9
10
  GET_BY_UUID: (uuid) => `${uuid}`, // Get internal squad by uuid // get
10
11
  DELETE: (uuid) => `${uuid}`, // Delete internal squad by uuid // delete
12
+ BULK_ACTIONS: {
13
+ ADD_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/add-users`, // Add users to internal squad // post
14
+ REMOVE_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/remove-users`, // Remove users from internal squad // delete
15
+ },
11
16
  };
@@ -9,6 +9,7 @@ exports.USERS_ROUTES = {
9
9
  GET: '',
10
10
  DELETE: (uuid) => `${uuid}`,
11
11
  GET_BY_UUID: (uuid) => `${uuid}`,
12
+ ACCESSIBLE_NODES: (uuid) => `${uuid}/accessible-nodes`,
12
13
  ACTIONS: {
13
14
  ENABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/enable`,
14
15
  DISABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/disable`,
@@ -80,6 +80,7 @@ exports.REST_API = {
80
80
  GET: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET}`,
81
81
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE(uuid)}`,
82
82
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_UUID(uuid)}`,
83
+ ACCESSIBLE_NODES: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACCESSIBLE_NODES(uuid)}`,
83
84
  ACTIONS: {
84
85
  DISABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.DISABLE(uuid)}`,
85
86
  ENABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.ENABLE(uuid)}`,
@@ -177,5 +178,23 @@ exports.REST_API = {
177
178
  UPDATE: `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.UPDATE}`,
178
179
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.GET_BY_UUID(uuid)}`,
179
180
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.DELETE(uuid)}`,
181
+ BULK_ACTIONS: {
182
+ ADD_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(uuid)}`,
183
+ REMOVE_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(uuid)}`,
184
+ },
185
+ },
186
+ INFRA_BILLING: {
187
+ GET_PROVIDERS: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDERS}`,
188
+ CREATE_PROVIDER: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_PROVIDER}`,
189
+ UPDATE_PROVIDER: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_PROVIDER}`,
190
+ DELETE_PROVIDER: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_PROVIDER(uuid)}`,
191
+ GET_PROVIDER_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDER_BY_UUID(uuid)}`,
192
+ GET_BILLING_NODES: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_NODES}`,
193
+ CREATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE}`,
194
+ UPDATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE}`,
195
+ DELETE_BILLING_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_NODE(uuid)}`,
196
+ GET_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_HISTORY}`,
197
+ CREATE_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY}`,
198
+ DELETE_BILLING_HISTORY: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_HISTORY(uuid)}`,
180
199
  },
181
200
  };
@@ -13,8 +13,8 @@ var CreateConfigProfileCommand;
13
13
  CreateConfigProfileCommand.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
  config: zod_1.z.object({}).passthrough(),
20
20
  });
@@ -11,21 +11,16 @@ var CreateHostCommand;
11
11
  CreateHostCommand.TSQ_url = CreateHostCommand.url;
12
12
  CreateHostCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HOSTS_ROUTES.CREATE, 'post', 'Create a new host');
13
13
  CreateHostCommand.RequestSchema = zod_1.z.object({
14
- configProfileUuid: zod_1.z
15
- .string({
16
- invalid_type_error: 'Config Profile UUID must be a string',
17
- })
18
- .uuid('Config Profile UUID must be a valid UUID')
19
- .optional(),
20
- configProfileInboundUuid: zod_1.z
21
- .string({
22
- invalid_type_error: 'Inbound UUID must be a string',
23
- })
24
- .uuid('Inbound UUID must be a valid UUID')
25
- .optional(),
14
+ inbound: zod_1.z.object({
15
+ configProfileUuid: zod_1.z.string().uuid(),
16
+ configProfileInboundUuid: zod_1.z.string().uuid(),
17
+ }),
26
18
  remark: zod_1.z
27
19
  .string({
28
20
  invalid_type_error: 'Remark must be a string',
21
+ })
22
+ .min(1, {
23
+ message: 'Remark must be at least 1 character',
29
24
  })
30
25
  .max(40, {
31
26
  message: 'Remark must be less than 40 characters',
@@ -43,10 +38,15 @@ var CreateHostCommand;
43
38
  host: zod_1.z.string().optional(),
44
39
  alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
45
40
  fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.FINGERPRINTS).nullable()),
46
- allowInsecure: zod_1.z.optional(zod_1.z.boolean().default(false)),
47
41
  isDisabled: zod_1.z.optional(zod_1.z.boolean().default(false)),
48
42
  securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS).default(constants_1.SECURITY_LAYERS.DEFAULT)),
49
43
  xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
44
+ serverDescription: zod_1.z.optional(zod_1.z
45
+ .string()
46
+ .max(30, {
47
+ message: 'Server description must be less than 30 characters',
48
+ })
49
+ .nullable()),
50
50
  });
51
51
  CreateHostCommand.ResponseSchema = zod_1.z.object({
52
52
  response: models_1.HostsSchema,
@@ -13,17 +13,11 @@ var UpdateHostCommand;
13
13
  UpdateHostCommand.RequestSchema = models_1.HostsSchema.pick({
14
14
  uuid: true,
15
15
  }).extend({
16
- configProfileUuid: zod_1.z
17
- .string({
18
- invalid_type_error: 'Config Profile UUID must be a string',
16
+ inbound: zod_1.z
17
+ .object({
18
+ configProfileUuid: zod_1.z.string().uuid(),
19
+ configProfileInboundUuid: zod_1.z.string().uuid(),
19
20
  })
20
- .uuid('Config Profile UUID must be a valid UUID')
21
- .optional(),
22
- configProfileInboundUuid: zod_1.z
23
- .string({
24
- invalid_type_error: 'Inbound UUID must be a string',
25
- })
26
- .uuid('Inbound UUID must be a valid UUID')
27
21
  .optional(),
28
22
  remark: zod_1.z
29
23
  .string({
@@ -49,10 +43,15 @@ var UpdateHostCommand;
49
43
  host: zod_1.z.optional(zod_1.z.string()),
50
44
  alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
51
45
  fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.FINGERPRINTS).nullable()),
52
- allowInsecure: zod_1.z.optional(zod_1.z.boolean()),
53
46
  isDisabled: zod_1.z.optional(zod_1.z.boolean()),
54
47
  securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS)),
55
48
  xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
49
+ serverDescription: zod_1.z.optional(zod_1.z
50
+ .string()
51
+ .max(30, {
52
+ message: 'Server description must be less than 30 characters',
53
+ })
54
+ .nullable()),
56
55
  });
57
56
  UpdateHostCommand.ResponseSchema = zod_1.z.object({
58
57
  response: models_1.HostsSchema,
@@ -19,6 +19,7 @@ __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./config-profiles"), exports);
20
20
  __exportStar(require("./hosts"), exports);
21
21
  __exportStar(require("./hwid"), exports);
22
+ __exportStar(require("./infra-billing"), exports);
22
23
  __exportStar(require("./internal-squads"), exports);
23
24
  __exportStar(require("./keygen"), exports);
24
25
  __exportStar(require("./nodes"), exports);
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateInfraBillingHistoryRecordCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ const constants_1 = require("../../constants");
8
+ var CreateInfraBillingHistoryRecordCommand;
9
+ (function (CreateInfraBillingHistoryRecordCommand) {
10
+ CreateInfraBillingHistoryRecordCommand.url = api_1.REST_API.INFRA_BILLING.CREATE_BILLING_HISTORY;
11
+ CreateInfraBillingHistoryRecordCommand.TSQ_url = CreateInfraBillingHistoryRecordCommand.url;
12
+ CreateInfraBillingHistoryRecordCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY, 'post', 'Create infra billing history');
13
+ CreateInfraBillingHistoryRecordCommand.RequestSchema = zod_1.z.object({
14
+ providerUuid: zod_1.z.string().uuid(),
15
+ amount: zod_1.z.number().min(0, 'Amount must be greater than 0'),
16
+ billedAt: zod_1.z
17
+ .string({
18
+ invalid_type_error: 'Invalid date format',
19
+ })
20
+ .datetime({ message: 'Invalid date format', offset: true, local: true })
21
+ .transform((str) => new Date(str))
22
+ .describe('Billing date. Format: 2025-01-17T15:38:45.065Z'),
23
+ });
24
+ CreateInfraBillingHistoryRecordCommand.ResponseSchema = zod_1.z.object({
25
+ response: zod_1.z.object({
26
+ records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
27
+ total: zod_1.z.number(),
28
+ }),
29
+ });
30
+ })(CreateInfraBillingHistoryRecordCommand || (exports.CreateInfraBillingHistoryRecordCommand = CreateInfraBillingHistoryRecordCommand = {}));
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateInfraBillingNodeCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ const constants_1 = require("../../constants");
8
+ var CreateInfraBillingNodeCommand;
9
+ (function (CreateInfraBillingNodeCommand) {
10
+ CreateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.CREATE_BILLING_NODE;
11
+ CreateInfraBillingNodeCommand.TSQ_url = CreateInfraBillingNodeCommand.url;
12
+ CreateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE, 'post', 'Create infra billing node');
13
+ CreateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
14
+ providerUuid: zod_1.z.string().uuid(),
15
+ nodeUuid: zod_1.z.string().uuid(),
16
+ nextBillingAt: zod_1.z
17
+ .string({
18
+ invalid_type_error: 'Invalid date format',
19
+ })
20
+ .datetime({ message: 'Invalid date format', offset: true, local: true })
21
+ .transform((str) => new Date(str))
22
+ .optional()
23
+ .describe('Next billing date. Format: 2025-01-17T15:38:45.065Z'),
24
+ });
25
+ CreateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
26
+ response: zod_1.z.object({
27
+ totalBillingNodes: zod_1.z.number(),
28
+ billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
29
+ availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
30
+ totalAvailableBillingNodes: zod_1.z.number(),
31
+ stats: zod_1.z.object({
32
+ upcomingNodesCount: zod_1.z.number(),
33
+ currentMonthPayments: zod_1.z.number(),
34
+ totalSpent: zod_1.z.number(),
35
+ }),
36
+ }),
37
+ });
38
+ })(CreateInfraBillingNodeCommand || (exports.CreateInfraBillingNodeCommand = CreateInfraBillingNodeCommand = {}));
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateInfraProviderCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ const models_1 = require("../../models");
8
+ var CreateInfraProviderCommand;
9
+ (function (CreateInfraProviderCommand) {
10
+ CreateInfraProviderCommand.url = api_1.REST_API.INFRA_BILLING.CREATE_PROVIDER;
11
+ CreateInfraProviderCommand.TSQ_url = CreateInfraProviderCommand.url;
12
+ CreateInfraProviderCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.CREATE_PROVIDER, 'post', 'Create infra provider');
13
+ CreateInfraProviderCommand.RequestSchema = zod_1.z.object({
14
+ name: zod_1.z
15
+ .string()
16
+ .min(2, 'Name must be at least 2 characters')
17
+ .max(30, 'Name must be less than 30 characters'),
18
+ faviconLink: zod_1.z.string().url().optional(),
19
+ loginUrl: zod_1.z.string().url().optional(),
20
+ });
21
+ CreateInfraProviderCommand.ResponseSchema = zod_1.z.object({
22
+ response: models_1.InfraProviderSchema,
23
+ });
24
+ })(CreateInfraProviderCommand || (exports.CreateInfraProviderCommand = CreateInfraProviderCommand = {}));
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteInfraBillingHistoryRecordCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ const constants_1 = require("../../constants");
8
+ var DeleteInfraBillingHistoryRecordCommand;
9
+ (function (DeleteInfraBillingHistoryRecordCommand) {
10
+ DeleteInfraBillingHistoryRecordCommand.url = api_1.REST_API.INFRA_BILLING.DELETE_BILLING_HISTORY(':uuid');
11
+ DeleteInfraBillingHistoryRecordCommand.TSQ_url = DeleteInfraBillingHistoryRecordCommand.url;
12
+ DeleteInfraBillingHistoryRecordCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.DELETE_BILLING_HISTORY(':uuid'), 'delete', 'Delete infra billing history');
13
+ DeleteInfraBillingHistoryRecordCommand.RequestSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ });
16
+ DeleteInfraBillingHistoryRecordCommand.ResponseSchema = zod_1.z.object({
17
+ response: zod_1.z.object({
18
+ records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
19
+ total: zod_1.z.number(),
20
+ }),
21
+ });
22
+ })(DeleteInfraBillingHistoryRecordCommand || (exports.DeleteInfraBillingHistoryRecordCommand = DeleteInfraBillingHistoryRecordCommand = {}));
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteInfraBillingNodeByUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ const constants_1 = require("../../constants");
8
+ var DeleteInfraBillingNodeByUuidCommand;
9
+ (function (DeleteInfraBillingNodeByUuidCommand) {
10
+ DeleteInfraBillingNodeByUuidCommand.url = api_1.REST_API.INFRA_BILLING.DELETE_BILLING_NODE(':uuid');
11
+ DeleteInfraBillingNodeByUuidCommand.TSQ_url = DeleteInfraBillingNodeByUuidCommand.url;
12
+ DeleteInfraBillingNodeByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.DELETE_BILLING_NODE(':uuid'), 'delete', 'Delete infra billing node');
13
+ DeleteInfraBillingNodeByUuidCommand.RequestSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ });
16
+ DeleteInfraBillingNodeByUuidCommand.ResponseSchema = zod_1.z.object({
17
+ response: zod_1.z.object({
18
+ totalBillingNodes: zod_1.z.number(),
19
+ billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
20
+ availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
21
+ totalAvailableBillingNodes: zod_1.z.number(),
22
+ stats: zod_1.z.object({
23
+ upcomingNodesCount: zod_1.z.number(),
24
+ currentMonthPayments: zod_1.z.number(),
25
+ totalSpent: zod_1.z.number(),
26
+ }),
27
+ }),
28
+ });
29
+ })(DeleteInfraBillingNodeByUuidCommand || (exports.DeleteInfraBillingNodeByUuidCommand = DeleteInfraBillingNodeByUuidCommand = {}));
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteInfraProviderByUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ var DeleteInfraProviderByUuidCommand;
8
+ (function (DeleteInfraProviderByUuidCommand) {
9
+ DeleteInfraProviderByUuidCommand.url = api_1.REST_API.INFRA_BILLING.DELETE_PROVIDER(':uuid');
10
+ DeleteInfraProviderByUuidCommand.TSQ_url = DeleteInfraProviderByUuidCommand.url;
11
+ DeleteInfraProviderByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.DELETE_PROVIDER(':uuid'), 'delete', 'Delete infra provider by uuid');
12
+ DeleteInfraProviderByUuidCommand.RequestSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ });
15
+ DeleteInfraProviderByUuidCommand.ResponseSchema = zod_1.z.object({
16
+ response: zod_1.z.object({
17
+ isDeleted: zod_1.z.boolean(),
18
+ }),
19
+ });
20
+ })(DeleteInfraProviderByUuidCommand || (exports.DeleteInfraProviderByUuidCommand = DeleteInfraProviderByUuidCommand = {}));
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetInfraBillingHistoryRecordsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ const constants_1 = require("../../constants");
8
+ var GetInfraBillingHistoryRecordsCommand;
9
+ (function (GetInfraBillingHistoryRecordsCommand) {
10
+ GetInfraBillingHistoryRecordsCommand.url = api_1.REST_API.INFRA_BILLING.GET_BILLING_HISTORY;
11
+ GetInfraBillingHistoryRecordsCommand.TSQ_url = GetInfraBillingHistoryRecordsCommand.url;
12
+ GetInfraBillingHistoryRecordsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.GET_BILLING_HISTORY, 'get', 'Get infra billing history');
13
+ GetInfraBillingHistoryRecordsCommand.RequestQuerySchema = zod_1.z.object({
14
+ start: zod_1.z.coerce
15
+ .number()
16
+ .default(0)
17
+ .describe('Start index (offset) of the billing history records to return, default is 0'),
18
+ size: zod_1.z.coerce
19
+ .number()
20
+ .min(1, 'Size (limit) must be greater than 0')
21
+ .max(500, 'Size (limit) must be less than 500')
22
+ .describe('Number of billing records to return, no more than 500')
23
+ .default(50),
24
+ });
25
+ GetInfraBillingHistoryRecordsCommand.ResponseSchema = zod_1.z.object({
26
+ response: zod_1.z.object({
27
+ records: zod_1.z.array(models_1.InfraBillingHistoryRecordSchema),
28
+ total: zod_1.z.number(),
29
+ }),
30
+ });
31
+ })(GetInfraBillingHistoryRecordsCommand || (exports.GetInfraBillingHistoryRecordsCommand = GetInfraBillingHistoryRecordsCommand = {}));