@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
@@ -0,0 +1,125 @@
1
+ import { z } from 'zod';
2
+ export declare namespace CreateInfraBillingHistoryRecordCommand {
3
+ const url: "/api/infra-billing/history";
4
+ const TSQ_url: "/api/infra-billing/history";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestSchema: z.ZodObject<{
7
+ providerUuid: z.ZodString;
8
+ amount: z.ZodNumber;
9
+ billedAt: z.ZodEffects<z.ZodString, Date, string>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ providerUuid: string;
12
+ amount: number;
13
+ billedAt: Date;
14
+ }, {
15
+ providerUuid: string;
16
+ amount: number;
17
+ billedAt: string;
18
+ }>;
19
+ type Request = z.infer<typeof RequestSchema>;
20
+ const ResponseSchema: z.ZodObject<{
21
+ response: z.ZodObject<{
22
+ records: z.ZodArray<z.ZodObject<{
23
+ uuid: z.ZodString;
24
+ providerUuid: z.ZodString;
25
+ amount: z.ZodNumber;
26
+ billedAt: z.ZodEffects<z.ZodString, Date, string>;
27
+ provider: z.ZodObject<Omit<{
28
+ uuid: z.ZodString;
29
+ name: z.ZodString;
30
+ faviconLink: z.ZodNullable<z.ZodString>;
31
+ loginUrl: z.ZodNullable<z.ZodString>;
32
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
33
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
34
+ }, "createdAt" | "updatedAt" | "loginUrl">, "strip", z.ZodTypeAny, {
35
+ uuid: string;
36
+ name: string;
37
+ faviconLink: string | null;
38
+ }, {
39
+ uuid: string;
40
+ name: string;
41
+ faviconLink: string | null;
42
+ }>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ uuid: string;
45
+ providerUuid: string;
46
+ provider: {
47
+ uuid: string;
48
+ name: string;
49
+ faviconLink: string | null;
50
+ };
51
+ amount: number;
52
+ billedAt: Date;
53
+ }, {
54
+ uuid: string;
55
+ providerUuid: string;
56
+ provider: {
57
+ uuid: string;
58
+ name: string;
59
+ faviconLink: string | null;
60
+ };
61
+ amount: number;
62
+ billedAt: string;
63
+ }>, "many">;
64
+ total: z.ZodNumber;
65
+ }, "strip", z.ZodTypeAny, {
66
+ total: number;
67
+ records: {
68
+ uuid: string;
69
+ providerUuid: string;
70
+ provider: {
71
+ uuid: string;
72
+ name: string;
73
+ faviconLink: string | null;
74
+ };
75
+ amount: number;
76
+ billedAt: Date;
77
+ }[];
78
+ }, {
79
+ total: number;
80
+ records: {
81
+ uuid: string;
82
+ providerUuid: string;
83
+ provider: {
84
+ uuid: string;
85
+ name: string;
86
+ faviconLink: string | null;
87
+ };
88
+ amount: number;
89
+ billedAt: string;
90
+ }[];
91
+ }>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ response: {
94
+ total: number;
95
+ records: {
96
+ uuid: string;
97
+ providerUuid: string;
98
+ provider: {
99
+ uuid: string;
100
+ name: string;
101
+ faviconLink: string | null;
102
+ };
103
+ amount: number;
104
+ billedAt: Date;
105
+ }[];
106
+ };
107
+ }, {
108
+ response: {
109
+ total: number;
110
+ records: {
111
+ uuid: string;
112
+ providerUuid: string;
113
+ provider: {
114
+ uuid: string;
115
+ name: string;
116
+ faviconLink: string | null;
117
+ };
118
+ amount: number;
119
+ billedAt: string;
120
+ }[];
121
+ };
122
+ }>;
123
+ type Response = z.infer<typeof ResponseSchema>;
124
+ }
125
+ //# sourceMappingURL=create-bill-record.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-bill-record.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/create-bill-record.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,sCAAsC,CAAC;IAC7C,MAAM,GAAG,8BAAgD,CAAC;IAC1D,MAAM,OAAO,8BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;MAUxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -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,467 @@
1
+ import { z } from 'zod';
2
+ export declare namespace CreateInfraBillingNodeCommand {
3
+ const url: "/api/infra-billing/nodes";
4
+ const TSQ_url: "/api/infra-billing/nodes";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestSchema: z.ZodObject<{
7
+ providerUuid: z.ZodString;
8
+ nodeUuid: z.ZodString;
9
+ nextBillingAt: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ nodeUuid: string;
12
+ providerUuid: string;
13
+ nextBillingAt?: Date | undefined;
14
+ }, {
15
+ nodeUuid: string;
16
+ providerUuid: string;
17
+ nextBillingAt?: string | undefined;
18
+ }>;
19
+ type Request = z.infer<typeof RequestSchema>;
20
+ const ResponseSchema: z.ZodObject<{
21
+ response: z.ZodObject<{
22
+ totalBillingNodes: z.ZodNumber;
23
+ billingNodes: z.ZodArray<z.ZodObject<{
24
+ uuid: z.ZodString;
25
+ nodeUuid: z.ZodString;
26
+ providerUuid: z.ZodString;
27
+ provider: z.ZodObject<Pick<{
28
+ uuid: z.ZodString;
29
+ name: z.ZodString;
30
+ faviconLink: z.ZodNullable<z.ZodString>;
31
+ loginUrl: z.ZodNullable<z.ZodString>;
32
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
33
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
34
+ }, "uuid" | "name" | "faviconLink" | "loginUrl">, "strip", z.ZodTypeAny, {
35
+ uuid: string;
36
+ name: string;
37
+ faviconLink: string | null;
38
+ loginUrl: string | null;
39
+ }, {
40
+ uuid: string;
41
+ name: string;
42
+ faviconLink: string | null;
43
+ loginUrl: string | null;
44
+ }>;
45
+ node: z.ZodObject<Pick<{
46
+ uuid: z.ZodString;
47
+ name: z.ZodString;
48
+ address: z.ZodString;
49
+ port: z.ZodNullable<z.ZodNumber>;
50
+ isConnected: z.ZodBoolean;
51
+ isDisabled: z.ZodBoolean;
52
+ isConnecting: z.ZodBoolean;
53
+ isNodeOnline: z.ZodBoolean;
54
+ isXrayRunning: z.ZodBoolean;
55
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
56
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
57
+ xrayVersion: z.ZodNullable<z.ZodString>;
58
+ nodeVersion: z.ZodNullable<z.ZodString>;
59
+ xrayUptime: z.ZodString;
60
+ isTrafficTrackingActive: z.ZodBoolean;
61
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
62
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
63
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
64
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
65
+ usersOnline: z.ZodNullable<z.ZodNumber>;
66
+ viewPosition: z.ZodNumber;
67
+ countryCode: z.ZodString;
68
+ consumptionMultiplier: z.ZodNumber;
69
+ cpuCount: z.ZodNullable<z.ZodNumber>;
70
+ cpuModel: z.ZodNullable<z.ZodString>;
71
+ totalRam: z.ZodNullable<z.ZodString>;
72
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
73
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
74
+ configProfile: z.ZodObject<{
75
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
76
+ activeInbounds: z.ZodArray<z.ZodObject<{
77
+ uuid: z.ZodString;
78
+ profileUuid: z.ZodString;
79
+ tag: z.ZodString;
80
+ type: z.ZodString;
81
+ network: z.ZodNullable<z.ZodString>;
82
+ security: z.ZodNullable<z.ZodString>;
83
+ port: z.ZodNullable<z.ZodNumber>;
84
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ type: string;
87
+ uuid: string;
88
+ profileUuid: string;
89
+ tag: string;
90
+ network: string | null;
91
+ security: string | null;
92
+ port: number | null;
93
+ rawInbound?: unknown;
94
+ }, {
95
+ type: string;
96
+ uuid: string;
97
+ profileUuid: string;
98
+ tag: string;
99
+ network: string | null;
100
+ security: string | null;
101
+ port: number | null;
102
+ rawInbound?: unknown;
103
+ }>, "many">;
104
+ }, "strip", z.ZodTypeAny, {
105
+ activeConfigProfileUuid: string | null;
106
+ activeInbounds: {
107
+ type: string;
108
+ uuid: string;
109
+ profileUuid: string;
110
+ tag: string;
111
+ network: string | null;
112
+ security: string | null;
113
+ port: number | null;
114
+ rawInbound?: unknown;
115
+ }[];
116
+ }, {
117
+ activeConfigProfileUuid: string | null;
118
+ activeInbounds: {
119
+ type: string;
120
+ uuid: string;
121
+ profileUuid: string;
122
+ tag: string;
123
+ network: string | null;
124
+ security: string | null;
125
+ port: number | null;
126
+ rawInbound?: unknown;
127
+ }[];
128
+ }>;
129
+ providerUuid: z.ZodNullable<z.ZodString>;
130
+ provider: z.ZodNullable<z.ZodObject<{
131
+ uuid: z.ZodString;
132
+ name: z.ZodString;
133
+ faviconLink: z.ZodNullable<z.ZodString>;
134
+ loginUrl: z.ZodNullable<z.ZodString>;
135
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
136
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
137
+ }, "strip", z.ZodTypeAny, {
138
+ uuid: string;
139
+ createdAt: Date;
140
+ updatedAt: Date;
141
+ name: string;
142
+ faviconLink: string | null;
143
+ loginUrl: string | null;
144
+ }, {
145
+ uuid: string;
146
+ createdAt: string;
147
+ updatedAt: string;
148
+ name: string;
149
+ faviconLink: string | null;
150
+ loginUrl: string | null;
151
+ }>>;
152
+ }, "uuid" | "name" | "countryCode">, "strip", z.ZodTypeAny, {
153
+ uuid: string;
154
+ name: string;
155
+ countryCode: string;
156
+ }, {
157
+ uuid: string;
158
+ name: string;
159
+ countryCode: string;
160
+ }>;
161
+ nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
162
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
163
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ uuid: string;
166
+ createdAt: Date;
167
+ updatedAt: Date;
168
+ nodeUuid: string;
169
+ providerUuid: string;
170
+ provider: {
171
+ uuid: string;
172
+ name: string;
173
+ faviconLink: string | null;
174
+ loginUrl: string | null;
175
+ };
176
+ node: {
177
+ uuid: string;
178
+ name: string;
179
+ countryCode: string;
180
+ };
181
+ nextBillingAt: Date;
182
+ }, {
183
+ uuid: string;
184
+ createdAt: string;
185
+ updatedAt: string;
186
+ nodeUuid: string;
187
+ providerUuid: string;
188
+ provider: {
189
+ uuid: string;
190
+ name: string;
191
+ faviconLink: string | null;
192
+ loginUrl: string | null;
193
+ };
194
+ node: {
195
+ uuid: string;
196
+ name: string;
197
+ countryCode: string;
198
+ };
199
+ nextBillingAt: string;
200
+ }>, "many">;
201
+ availableBillingNodes: z.ZodArray<z.ZodObject<Pick<{
202
+ uuid: z.ZodString;
203
+ name: z.ZodString;
204
+ address: z.ZodString;
205
+ port: z.ZodNullable<z.ZodNumber>;
206
+ isConnected: z.ZodBoolean;
207
+ isDisabled: z.ZodBoolean;
208
+ isConnecting: z.ZodBoolean;
209
+ isNodeOnline: z.ZodBoolean;
210
+ isXrayRunning: z.ZodBoolean;
211
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
212
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
213
+ xrayVersion: z.ZodNullable<z.ZodString>;
214
+ nodeVersion: z.ZodNullable<z.ZodString>;
215
+ xrayUptime: z.ZodString;
216
+ isTrafficTrackingActive: z.ZodBoolean;
217
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
218
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
219
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
220
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
221
+ usersOnline: z.ZodNullable<z.ZodNumber>;
222
+ viewPosition: z.ZodNumber;
223
+ countryCode: z.ZodString;
224
+ consumptionMultiplier: z.ZodNumber;
225
+ cpuCount: z.ZodNullable<z.ZodNumber>;
226
+ cpuModel: z.ZodNullable<z.ZodString>;
227
+ totalRam: z.ZodNullable<z.ZodString>;
228
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
229
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
230
+ configProfile: z.ZodObject<{
231
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
232
+ activeInbounds: z.ZodArray<z.ZodObject<{
233
+ uuid: z.ZodString;
234
+ profileUuid: z.ZodString;
235
+ tag: z.ZodString;
236
+ type: z.ZodString;
237
+ network: z.ZodNullable<z.ZodString>;
238
+ security: z.ZodNullable<z.ZodString>;
239
+ port: z.ZodNullable<z.ZodNumber>;
240
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
241
+ }, "strip", z.ZodTypeAny, {
242
+ type: string;
243
+ uuid: string;
244
+ profileUuid: string;
245
+ tag: string;
246
+ network: string | null;
247
+ security: string | null;
248
+ port: number | null;
249
+ rawInbound?: unknown;
250
+ }, {
251
+ type: string;
252
+ uuid: string;
253
+ profileUuid: string;
254
+ tag: string;
255
+ network: string | null;
256
+ security: string | null;
257
+ port: number | null;
258
+ rawInbound?: unknown;
259
+ }>, "many">;
260
+ }, "strip", z.ZodTypeAny, {
261
+ activeConfigProfileUuid: string | null;
262
+ activeInbounds: {
263
+ type: string;
264
+ uuid: string;
265
+ profileUuid: string;
266
+ tag: string;
267
+ network: string | null;
268
+ security: string | null;
269
+ port: number | null;
270
+ rawInbound?: unknown;
271
+ }[];
272
+ }, {
273
+ activeConfigProfileUuid: string | null;
274
+ activeInbounds: {
275
+ type: string;
276
+ uuid: string;
277
+ profileUuid: string;
278
+ tag: string;
279
+ network: string | null;
280
+ security: string | null;
281
+ port: number | null;
282
+ rawInbound?: unknown;
283
+ }[];
284
+ }>;
285
+ providerUuid: z.ZodNullable<z.ZodString>;
286
+ provider: z.ZodNullable<z.ZodObject<{
287
+ uuid: z.ZodString;
288
+ name: z.ZodString;
289
+ faviconLink: z.ZodNullable<z.ZodString>;
290
+ loginUrl: z.ZodNullable<z.ZodString>;
291
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
292
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ uuid: string;
295
+ createdAt: Date;
296
+ updatedAt: Date;
297
+ name: string;
298
+ faviconLink: string | null;
299
+ loginUrl: string | null;
300
+ }, {
301
+ uuid: string;
302
+ createdAt: string;
303
+ updatedAt: string;
304
+ name: string;
305
+ faviconLink: string | null;
306
+ loginUrl: string | null;
307
+ }>>;
308
+ }, "uuid" | "name" | "countryCode">, "strip", z.ZodTypeAny, {
309
+ uuid: string;
310
+ name: string;
311
+ countryCode: string;
312
+ }, {
313
+ uuid: string;
314
+ name: string;
315
+ countryCode: string;
316
+ }>, "many">;
317
+ totalAvailableBillingNodes: z.ZodNumber;
318
+ stats: z.ZodObject<{
319
+ upcomingNodesCount: z.ZodNumber;
320
+ currentMonthPayments: z.ZodNumber;
321
+ totalSpent: z.ZodNumber;
322
+ }, "strip", z.ZodTypeAny, {
323
+ upcomingNodesCount: number;
324
+ currentMonthPayments: number;
325
+ totalSpent: number;
326
+ }, {
327
+ upcomingNodesCount: number;
328
+ currentMonthPayments: number;
329
+ totalSpent: number;
330
+ }>;
331
+ }, "strip", z.ZodTypeAny, {
332
+ stats: {
333
+ upcomingNodesCount: number;
334
+ currentMonthPayments: number;
335
+ totalSpent: number;
336
+ };
337
+ billingNodes: {
338
+ uuid: string;
339
+ createdAt: Date;
340
+ updatedAt: Date;
341
+ nodeUuid: string;
342
+ providerUuid: string;
343
+ provider: {
344
+ uuid: string;
345
+ name: string;
346
+ faviconLink: string | null;
347
+ loginUrl: string | null;
348
+ };
349
+ node: {
350
+ uuid: string;
351
+ name: string;
352
+ countryCode: string;
353
+ };
354
+ nextBillingAt: Date;
355
+ }[];
356
+ totalBillingNodes: number;
357
+ availableBillingNodes: {
358
+ uuid: string;
359
+ name: string;
360
+ countryCode: string;
361
+ }[];
362
+ totalAvailableBillingNodes: number;
363
+ }, {
364
+ stats: {
365
+ upcomingNodesCount: number;
366
+ currentMonthPayments: number;
367
+ totalSpent: number;
368
+ };
369
+ billingNodes: {
370
+ uuid: string;
371
+ createdAt: string;
372
+ updatedAt: string;
373
+ nodeUuid: string;
374
+ providerUuid: string;
375
+ provider: {
376
+ uuid: string;
377
+ name: string;
378
+ faviconLink: string | null;
379
+ loginUrl: string | null;
380
+ };
381
+ node: {
382
+ uuid: string;
383
+ name: string;
384
+ countryCode: string;
385
+ };
386
+ nextBillingAt: string;
387
+ }[];
388
+ totalBillingNodes: number;
389
+ availableBillingNodes: {
390
+ uuid: string;
391
+ name: string;
392
+ countryCode: string;
393
+ }[];
394
+ totalAvailableBillingNodes: number;
395
+ }>;
396
+ }, "strip", z.ZodTypeAny, {
397
+ response: {
398
+ stats: {
399
+ upcomingNodesCount: number;
400
+ currentMonthPayments: number;
401
+ totalSpent: number;
402
+ };
403
+ billingNodes: {
404
+ uuid: string;
405
+ createdAt: Date;
406
+ updatedAt: Date;
407
+ nodeUuid: string;
408
+ providerUuid: string;
409
+ provider: {
410
+ uuid: string;
411
+ name: string;
412
+ faviconLink: string | null;
413
+ loginUrl: string | null;
414
+ };
415
+ node: {
416
+ uuid: string;
417
+ name: string;
418
+ countryCode: string;
419
+ };
420
+ nextBillingAt: Date;
421
+ }[];
422
+ totalBillingNodes: number;
423
+ availableBillingNodes: {
424
+ uuid: string;
425
+ name: string;
426
+ countryCode: string;
427
+ }[];
428
+ totalAvailableBillingNodes: number;
429
+ };
430
+ }, {
431
+ response: {
432
+ stats: {
433
+ upcomingNodesCount: number;
434
+ currentMonthPayments: number;
435
+ totalSpent: number;
436
+ };
437
+ billingNodes: {
438
+ uuid: string;
439
+ createdAt: string;
440
+ updatedAt: string;
441
+ nodeUuid: string;
442
+ providerUuid: string;
443
+ provider: {
444
+ uuid: string;
445
+ name: string;
446
+ faviconLink: string | null;
447
+ loginUrl: string | null;
448
+ };
449
+ node: {
450
+ uuid: string;
451
+ name: string;
452
+ countryCode: string;
453
+ };
454
+ nextBillingAt: string;
455
+ }[];
456
+ totalBillingNodes: number;
457
+ availableBillingNodes: {
458
+ uuid: string;
459
+ name: string;
460
+ countryCode: string;
461
+ }[];
462
+ totalAvailableBillingNodes: number;
463
+ };
464
+ }>;
465
+ type Response = z.infer<typeof ResponseSchema>;
466
+ }
467
+ //# sourceMappingURL=create-billing-node.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-billing-node.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/create-billing-node.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,6BAA6B,CAAC;IACpC,MAAM,GAAG,4BAA6C,CAAC;IACvD,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;MAWxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -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 = {}));