@remnawave/backend-contract 2.0.0-alpha.2 → 2.0.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) 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/users.d.ts +1 -0
  8. package/build/backend/api/controllers/users.d.ts.map +1 -1
  9. package/build/backend/api/controllers/users.js +1 -0
  10. package/build/backend/api/routes.d.ts +15 -0
  11. package/build/backend/api/routes.d.ts.map +1 -1
  12. package/build/backend/api/routes.js +15 -0
  13. package/build/backend/commands/config-profiles/create-config-profile.command.js +2 -2
  14. package/build/backend/commands/hosts/create.command.d.ts +6 -6
  15. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  16. package/build/backend/commands/hosts/create.command.js +4 -2
  17. package/build/backend/commands/index.d.ts +1 -0
  18. package/build/backend/commands/index.d.ts.map +1 -1
  19. package/build/backend/commands/index.js +1 -0
  20. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts +125 -0
  21. package/build/backend/commands/infra-billing/create-bill-record.command.d.ts.map +1 -0
  22. package/build/backend/commands/infra-billing/create-bill-record.command.js +30 -0
  23. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +413 -0
  24. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -0
  25. package/build/backend/commands/infra-billing/create-billing-node.command.js +38 -0
  26. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +123 -0
  27. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts.map +1 -0
  28. package/build/backend/commands/infra-billing/create-infra-provider.command.js +24 -0
  29. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts +119 -0
  30. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.d.ts.map +1 -0
  31. package/build/backend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  32. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +407 -0
  33. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -0
  34. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  35. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts +33 -0
  36. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.d.ts.map +1 -0
  37. package/build/backend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  38. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts +122 -0
  39. package/build/backend/commands/infra-billing/get-bill-records.command.d.ts.map +1 -0
  40. package/build/backend/commands/infra-billing/get-bill-records.command.js +31 -0
  41. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts +399 -0
  42. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts.map +1 -0
  43. package/build/backend/commands/infra-billing/get-blling-nodes.command.js +26 -0
  44. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +117 -0
  45. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts.map +1 -0
  46. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  47. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +156 -0
  48. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts.map +1 -0
  49. package/build/backend/commands/infra-billing/get-infra-providers.command.js +19 -0
  50. package/build/backend/commands/infra-billing/index.d.ts +13 -0
  51. package/build/backend/commands/infra-billing/index.d.ts.map +1 -0
  52. package/build/backend/commands/infra-billing/index.js +28 -0
  53. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +410 -0
  54. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -0
  55. package/build/backend/commands/infra-billing/update-billing-node.command.js +35 -0
  56. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +126 -0
  57. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts.map +1 -0
  58. package/build/backend/commands/infra-billing/update-infra-provider.command.js +26 -0
  59. package/build/backend/commands/internal-squads/create-internal-squad.command.js +2 -2
  60. package/build/backend/commands/nodes/actions/disable.command.d.ts +59 -0
  61. package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
  62. package/build/backend/commands/nodes/actions/enable.command.d.ts +59 -0
  63. package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
  64. package/build/backend/commands/nodes/actions/reorder.command.d.ts +82 -0
  65. package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
  66. package/build/backend/commands/nodes/create.command.d.ts +62 -0
  67. package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
  68. package/build/backend/commands/nodes/create.command.js +1 -0
  69. package/build/backend/commands/nodes/get-all.command.d.ts +59 -0
  70. package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
  71. package/build/backend/commands/nodes/get-one.command.d.ts +59 -0
  72. package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
  73. package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.d.ts +4 -4
  74. package/build/backend/commands/nodes/stats/get-nodes-usage-by-range.command.d.ts +4 -4
  75. package/build/backend/commands/nodes/update.command.d.ts +85 -0
  76. package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
  77. package/build/backend/commands/nodes/update.command.js +1 -0
  78. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +114 -0
  79. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts.map +1 -0
  80. package/build/backend/commands/users/get-user-accessible-nodes.command.js +31 -0
  81. package/build/backend/commands/users/get-user-usage-by-range.command.d.ts +4 -4
  82. package/build/backend/commands/users/index.d.ts +1 -0
  83. package/build/backend/commands/users/index.d.ts.map +1 -1
  84. package/build/backend/commands/users/index.js +1 -0
  85. package/build/backend/constants/errors/errors.d.ts +75 -0
  86. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  87. package/build/backend/constants/errors/errors.js +75 -0
  88. package/build/backend/constants/events/events.d.ts +11 -0
  89. package/build/backend/constants/events/events.d.ts.map +1 -1
  90. package/build/backend/constants/events/events.js +10 -0
  91. package/build/backend/constants/templates/template-keys.d.ts +1 -1
  92. package/build/backend/constants/templates/template-keys.d.ts.map +1 -1
  93. package/build/backend/constants/templates/template-keys.js +1 -0
  94. package/build/backend/models/index.d.ts +4 -0
  95. package/build/backend/models/index.d.ts.map +1 -1
  96. package/build/backend/models/index.js +4 -0
  97. package/build/backend/models/infra-billing-available-node.schema.d.ts +90 -0
  98. package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -0
  99. package/build/backend/models/infra-billing-available-node.schema.js +9 -0
  100. package/build/backend/models/infra-billing-history-record.schema.d.ts +44 -0
  101. package/build/backend/models/infra-billing-history-record.schema.d.ts.map +1 -0
  102. package/build/backend/models/infra-billing-history-record.schema.js +19 -0
  103. package/build/backend/models/infra-billing-node.schema.d.ts +153 -0
  104. package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -0
  105. package/build/backend/models/infra-billing-node.schema.js +34 -0
  106. package/build/backend/models/infra-provider.schema.d.ts +87 -0
  107. package/build/backend/models/infra-provider.schema.d.ts.map +1 -0
  108. package/build/backend/models/infra-provider.schema.js +41 -0
  109. package/build/backend/models/nodes.schema.d.ts +41 -0
  110. package/build/backend/models/nodes.schema.d.ts.map +1 -1
  111. package/build/backend/models/nodes.schema.js +3 -0
  112. package/build/frontend/api/controllers/index.js +1 -0
  113. package/build/frontend/api/controllers/infra-billing.js +18 -0
  114. package/build/frontend/api/controllers/users.js +1 -0
  115. package/build/frontend/api/routes.js +15 -0
  116. package/build/frontend/commands/config-profiles/create-config-profile.command.js +2 -2
  117. package/build/frontend/commands/hosts/create.command.js +4 -2
  118. package/build/frontend/commands/index.js +1 -0
  119. package/build/frontend/commands/infra-billing/create-bill-record.command.js +30 -0
  120. package/build/frontend/commands/infra-billing/create-billing-node.command.js +38 -0
  121. package/build/frontend/commands/infra-billing/create-infra-provider.command.js +24 -0
  122. package/build/frontend/commands/infra-billing/delete-bill-record-by-uuid.command.js +22 -0
  123. package/build/frontend/commands/infra-billing/delete-billing-node-by-uuid.command.js +29 -0
  124. package/build/frontend/commands/infra-billing/delete-infra-provider-by-uuid.command.js +20 -0
  125. package/build/frontend/commands/infra-billing/get-bill-records.command.js +31 -0
  126. package/build/frontend/commands/infra-billing/get-blling-nodes.command.js +26 -0
  127. package/build/frontend/commands/infra-billing/get-infra-provider-by-uuid.command.js +19 -0
  128. package/build/frontend/commands/infra-billing/get-infra-providers.command.js +19 -0
  129. package/build/frontend/commands/infra-billing/index.js +28 -0
  130. package/build/frontend/commands/infra-billing/update-billing-node.command.js +35 -0
  131. package/build/frontend/commands/infra-billing/update-infra-provider.command.js +26 -0
  132. package/build/frontend/commands/internal-squads/create-internal-squad.command.js +2 -2
  133. package/build/frontend/commands/nodes/create.command.js +1 -0
  134. package/build/frontend/commands/nodes/update.command.js +1 -0
  135. package/build/frontend/commands/users/get-user-accessible-nodes.command.js +31 -0
  136. package/build/frontend/commands/users/index.js +1 -0
  137. package/build/frontend/constants/errors/errors.js +75 -0
  138. package/build/frontend/constants/events/events.js +10 -0
  139. package/build/frontend/constants/templates/template-keys.js +1 -0
  140. package/build/frontend/models/index.js +4 -0
  141. package/build/frontend/models/infra-billing-available-node.schema.js +9 -0
  142. package/build/frontend/models/infra-billing-history-record.schema.js +19 -0
  143. package/build/frontend/models/infra-billing-node.schema.js +34 -0
  144. package/build/frontend/models/infra-provider.schema.js +41 -0
  145. package/build/frontend/models/nodes.schema.js +3 -0
  146. package/package.json +1 -1
@@ -0,0 +1,410 @@
1
+ import { z } from 'zod';
2
+ export declare namespace UpdateInfraBillingNodeCommand {
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
+ uuid: z.ZodString;
8
+ nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ uuid: string;
11
+ nextBillingAt: Date;
12
+ }, {
13
+ uuid: string;
14
+ nextBillingAt: string;
15
+ }>;
16
+ type Request = z.infer<typeof RequestSchema>;
17
+ const ResponseSchema: z.ZodObject<{
18
+ response: z.ZodObject<{
19
+ totalBillingNodes: z.ZodNumber;
20
+ billingNodes: z.ZodArray<z.ZodObject<{
21
+ uuid: z.ZodString;
22
+ nodeUuid: z.ZodString;
23
+ providerUuid: z.ZodString;
24
+ provider: z.ZodObject<Pick<{
25
+ uuid: z.ZodString;
26
+ name: z.ZodString;
27
+ faviconLink: z.ZodNullable<z.ZodString>;
28
+ loginUrl: z.ZodNullable<z.ZodString>;
29
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
30
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
31
+ }, "uuid" | "name" | "faviconLink" | "loginUrl">, "strip", z.ZodTypeAny, {
32
+ uuid: string;
33
+ name: string;
34
+ faviconLink: string | null;
35
+ loginUrl: string | null;
36
+ }, {
37
+ uuid: string;
38
+ name: string;
39
+ faviconLink: string | null;
40
+ loginUrl: string | null;
41
+ }>;
42
+ node: z.ZodObject<Pick<{
43
+ uuid: z.ZodString;
44
+ name: z.ZodString;
45
+ address: z.ZodString;
46
+ port: z.ZodNullable<z.ZodNumber>;
47
+ isConnected: z.ZodBoolean;
48
+ isDisabled: z.ZodBoolean;
49
+ isConnecting: z.ZodBoolean;
50
+ isNodeOnline: z.ZodBoolean;
51
+ isXrayRunning: z.ZodBoolean;
52
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
53
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
54
+ xrayVersion: z.ZodNullable<z.ZodString>;
55
+ xrayUptime: z.ZodString;
56
+ isTrafficTrackingActive: z.ZodBoolean;
57
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
58
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
59
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
60
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
61
+ usersOnline: z.ZodNullable<z.ZodNumber>;
62
+ viewPosition: z.ZodNumber;
63
+ countryCode: z.ZodString;
64
+ consumptionMultiplier: z.ZodNumber;
65
+ cpuCount: z.ZodNullable<z.ZodNumber>;
66
+ cpuModel: z.ZodNullable<z.ZodString>;
67
+ totalRam: z.ZodNullable<z.ZodString>;
68
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
69
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
70
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
71
+ activeInbounds: z.ZodNullable<z.ZodArray<z.ZodObject<{
72
+ uuid: z.ZodString;
73
+ profileUuid: z.ZodString;
74
+ tag: z.ZodString;
75
+ type: z.ZodString;
76
+ network: z.ZodNullable<z.ZodString>;
77
+ security: z.ZodNullable<z.ZodString>;
78
+ port: z.ZodNullable<z.ZodNumber>;
79
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ type: string;
82
+ uuid: string;
83
+ profileUuid: string;
84
+ tag: string;
85
+ network: string | null;
86
+ security: string | null;
87
+ port: number | null;
88
+ rawInbound?: unknown;
89
+ }, {
90
+ type: string;
91
+ uuid: string;
92
+ profileUuid: string;
93
+ tag: string;
94
+ network: string | null;
95
+ security: string | null;
96
+ port: number | null;
97
+ rawInbound?: unknown;
98
+ }>, "many">>;
99
+ providerUuid: z.ZodNullable<z.ZodString>;
100
+ provider: z.ZodNullable<z.ZodObject<{
101
+ uuid: z.ZodString;
102
+ name: z.ZodString;
103
+ faviconLink: z.ZodNullable<z.ZodString>;
104
+ loginUrl: z.ZodNullable<z.ZodString>;
105
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
106
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ uuid: string;
109
+ createdAt: Date;
110
+ updatedAt: Date;
111
+ name: string;
112
+ faviconLink: string | null;
113
+ loginUrl: string | null;
114
+ }, {
115
+ uuid: string;
116
+ createdAt: string;
117
+ updatedAt: string;
118
+ name: string;
119
+ faviconLink: string | null;
120
+ loginUrl: string | null;
121
+ }>>;
122
+ }, "uuid" | "name" | "countryCode">, "strip", z.ZodTypeAny, {
123
+ uuid: string;
124
+ name: string;
125
+ countryCode: string;
126
+ }, {
127
+ uuid: string;
128
+ name: string;
129
+ countryCode: string;
130
+ }>;
131
+ nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
132
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
133
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ uuid: string;
136
+ createdAt: Date;
137
+ updatedAt: Date;
138
+ nodeUuid: string;
139
+ providerUuid: string;
140
+ provider: {
141
+ uuid: string;
142
+ name: string;
143
+ faviconLink: string | null;
144
+ loginUrl: string | null;
145
+ };
146
+ node: {
147
+ uuid: string;
148
+ name: string;
149
+ countryCode: string;
150
+ };
151
+ nextBillingAt: Date;
152
+ }, {
153
+ uuid: string;
154
+ createdAt: string;
155
+ updatedAt: string;
156
+ nodeUuid: string;
157
+ providerUuid: string;
158
+ provider: {
159
+ uuid: string;
160
+ name: string;
161
+ faviconLink: string | null;
162
+ loginUrl: string | null;
163
+ };
164
+ node: {
165
+ uuid: string;
166
+ name: string;
167
+ countryCode: string;
168
+ };
169
+ nextBillingAt: string;
170
+ }>, "many">;
171
+ availableBillingNodes: z.ZodArray<z.ZodObject<Pick<{
172
+ uuid: z.ZodString;
173
+ name: z.ZodString;
174
+ address: z.ZodString;
175
+ port: z.ZodNullable<z.ZodNumber>;
176
+ isConnected: z.ZodBoolean;
177
+ isDisabled: z.ZodBoolean;
178
+ isConnecting: z.ZodBoolean;
179
+ isNodeOnline: z.ZodBoolean;
180
+ isXrayRunning: z.ZodBoolean;
181
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
182
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
183
+ xrayVersion: z.ZodNullable<z.ZodString>;
184
+ xrayUptime: z.ZodString;
185
+ isTrafficTrackingActive: z.ZodBoolean;
186
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
187
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
188
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
189
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
190
+ usersOnline: z.ZodNullable<z.ZodNumber>;
191
+ viewPosition: z.ZodNumber;
192
+ countryCode: z.ZodString;
193
+ consumptionMultiplier: z.ZodNumber;
194
+ cpuCount: z.ZodNullable<z.ZodNumber>;
195
+ cpuModel: z.ZodNullable<z.ZodString>;
196
+ totalRam: z.ZodNullable<z.ZodString>;
197
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
198
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
199
+ activeConfigProfileUuid: z.ZodNullable<z.ZodString>;
200
+ activeInbounds: z.ZodNullable<z.ZodArray<z.ZodObject<{
201
+ uuid: z.ZodString;
202
+ profileUuid: z.ZodString;
203
+ tag: z.ZodString;
204
+ type: z.ZodString;
205
+ network: z.ZodNullable<z.ZodString>;
206
+ security: z.ZodNullable<z.ZodString>;
207
+ port: z.ZodNullable<z.ZodNumber>;
208
+ rawInbound: z.ZodNullable<z.ZodUnknown>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ type: string;
211
+ uuid: string;
212
+ profileUuid: string;
213
+ tag: string;
214
+ network: string | null;
215
+ security: string | null;
216
+ port: number | null;
217
+ rawInbound?: unknown;
218
+ }, {
219
+ type: string;
220
+ uuid: string;
221
+ profileUuid: string;
222
+ tag: string;
223
+ network: string | null;
224
+ security: string | null;
225
+ port: number | null;
226
+ rawInbound?: unknown;
227
+ }>, "many">>;
228
+ providerUuid: z.ZodNullable<z.ZodString>;
229
+ provider: z.ZodNullable<z.ZodObject<{
230
+ uuid: z.ZodString;
231
+ name: z.ZodString;
232
+ faviconLink: z.ZodNullable<z.ZodString>;
233
+ loginUrl: z.ZodNullable<z.ZodString>;
234
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
235
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
236
+ }, "strip", z.ZodTypeAny, {
237
+ uuid: string;
238
+ createdAt: Date;
239
+ updatedAt: Date;
240
+ name: string;
241
+ faviconLink: string | null;
242
+ loginUrl: string | null;
243
+ }, {
244
+ uuid: string;
245
+ createdAt: string;
246
+ updatedAt: string;
247
+ name: string;
248
+ faviconLink: string | null;
249
+ loginUrl: string | null;
250
+ }>>;
251
+ }, "uuid" | "name" | "countryCode">, "strip", z.ZodTypeAny, {
252
+ uuid: string;
253
+ name: string;
254
+ countryCode: string;
255
+ }, {
256
+ uuid: string;
257
+ name: string;
258
+ countryCode: string;
259
+ }>, "many">;
260
+ totalAvailableBillingNodes: z.ZodNumber;
261
+ stats: z.ZodObject<{
262
+ upcomingNodesCount: z.ZodNumber;
263
+ currentMonthPayments: z.ZodNumber;
264
+ totalSpent: z.ZodNumber;
265
+ }, "strip", z.ZodTypeAny, {
266
+ upcomingNodesCount: number;
267
+ currentMonthPayments: number;
268
+ totalSpent: number;
269
+ }, {
270
+ upcomingNodesCount: number;
271
+ currentMonthPayments: number;
272
+ totalSpent: number;
273
+ }>;
274
+ }, "strip", z.ZodTypeAny, {
275
+ stats: {
276
+ upcomingNodesCount: number;
277
+ currentMonthPayments: number;
278
+ totalSpent: number;
279
+ };
280
+ billingNodes: {
281
+ uuid: string;
282
+ createdAt: Date;
283
+ updatedAt: Date;
284
+ nodeUuid: string;
285
+ providerUuid: string;
286
+ provider: {
287
+ uuid: string;
288
+ name: string;
289
+ faviconLink: string | null;
290
+ loginUrl: string | null;
291
+ };
292
+ node: {
293
+ uuid: string;
294
+ name: string;
295
+ countryCode: string;
296
+ };
297
+ nextBillingAt: Date;
298
+ }[];
299
+ totalBillingNodes: number;
300
+ availableBillingNodes: {
301
+ uuid: string;
302
+ name: string;
303
+ countryCode: string;
304
+ }[];
305
+ totalAvailableBillingNodes: number;
306
+ }, {
307
+ stats: {
308
+ upcomingNodesCount: number;
309
+ currentMonthPayments: number;
310
+ totalSpent: number;
311
+ };
312
+ billingNodes: {
313
+ uuid: string;
314
+ createdAt: string;
315
+ updatedAt: string;
316
+ nodeUuid: string;
317
+ providerUuid: string;
318
+ provider: {
319
+ uuid: string;
320
+ name: string;
321
+ faviconLink: string | null;
322
+ loginUrl: string | null;
323
+ };
324
+ node: {
325
+ uuid: string;
326
+ name: string;
327
+ countryCode: string;
328
+ };
329
+ nextBillingAt: string;
330
+ }[];
331
+ totalBillingNodes: number;
332
+ availableBillingNodes: {
333
+ uuid: string;
334
+ name: string;
335
+ countryCode: string;
336
+ }[];
337
+ totalAvailableBillingNodes: number;
338
+ }>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ response: {
341
+ stats: {
342
+ upcomingNodesCount: number;
343
+ currentMonthPayments: number;
344
+ totalSpent: number;
345
+ };
346
+ billingNodes: {
347
+ uuid: string;
348
+ createdAt: Date;
349
+ updatedAt: Date;
350
+ nodeUuid: string;
351
+ providerUuid: string;
352
+ provider: {
353
+ uuid: string;
354
+ name: string;
355
+ faviconLink: string | null;
356
+ loginUrl: string | null;
357
+ };
358
+ node: {
359
+ uuid: string;
360
+ name: string;
361
+ countryCode: string;
362
+ };
363
+ nextBillingAt: Date;
364
+ }[];
365
+ totalBillingNodes: number;
366
+ availableBillingNodes: {
367
+ uuid: string;
368
+ name: string;
369
+ countryCode: string;
370
+ }[];
371
+ totalAvailableBillingNodes: number;
372
+ };
373
+ }, {
374
+ response: {
375
+ stats: {
376
+ upcomingNodesCount: number;
377
+ currentMonthPayments: number;
378
+ totalSpent: number;
379
+ };
380
+ billingNodes: {
381
+ uuid: string;
382
+ createdAt: string;
383
+ updatedAt: string;
384
+ nodeUuid: string;
385
+ providerUuid: string;
386
+ provider: {
387
+ uuid: string;
388
+ name: string;
389
+ faviconLink: string | null;
390
+ loginUrl: string | null;
391
+ };
392
+ node: {
393
+ uuid: string;
394
+ name: string;
395
+ countryCode: string;
396
+ };
397
+ nextBillingAt: string;
398
+ }[];
399
+ totalBillingNodes: number;
400
+ availableBillingNodes: {
401
+ uuid: string;
402
+ name: string;
403
+ countryCode: string;
404
+ }[];
405
+ totalAvailableBillingNodes: number;
406
+ };
407
+ }>;
408
+ type Response = z.infer<typeof ResponseSchema>;
409
+ }
410
+ //# sourceMappingURL=update-billing-node.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-billing-node.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/update-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;;;;;;;;;MAQxB,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,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateInfraBillingNodeCommand = 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 UpdateInfraBillingNodeCommand;
9
+ (function (UpdateInfraBillingNodeCommand) {
10
+ UpdateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_BILLING_NODE;
11
+ UpdateInfraBillingNodeCommand.TSQ_url = UpdateInfraBillingNodeCommand.url;
12
+ UpdateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE, 'patch', 'Update infra billing node');
13
+ UpdateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ nextBillingAt: zod_1.z
16
+ .string({
17
+ invalid_type_error: 'Invalid date format',
18
+ })
19
+ .datetime({ message: 'Invalid date format', offset: true, local: true })
20
+ .transform((str) => new Date(str)),
21
+ });
22
+ UpdateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
23
+ response: zod_1.z.object({
24
+ totalBillingNodes: zod_1.z.number(),
25
+ billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
26
+ availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
27
+ totalAvailableBillingNodes: zod_1.z.number(),
28
+ stats: zod_1.z.object({
29
+ upcomingNodesCount: zod_1.z.number(),
30
+ currentMonthPayments: zod_1.z.number(),
31
+ totalSpent: zod_1.z.number(),
32
+ }),
33
+ }),
34
+ });
35
+ })(UpdateInfraBillingNodeCommand || (exports.UpdateInfraBillingNodeCommand = UpdateInfraBillingNodeCommand = {}));
@@ -0,0 +1,126 @@
1
+ import { z } from 'zod';
2
+ export declare namespace UpdateInfraProviderCommand {
3
+ const url: "/api/infra-billing/providers";
4
+ const TSQ_url: "/api/infra-billing/providers";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestSchema: z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ name: z.ZodOptional<z.ZodString>;
9
+ faviconLink: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ loginUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ uuid: string;
13
+ name?: string | undefined;
14
+ faviconLink?: string | null | undefined;
15
+ loginUrl?: string | null | undefined;
16
+ }, {
17
+ uuid: string;
18
+ name?: string | undefined;
19
+ faviconLink?: string | null | undefined;
20
+ loginUrl?: string | null | undefined;
21
+ }>;
22
+ type Request = z.infer<typeof RequestSchema>;
23
+ const ResponseSchema: z.ZodObject<{
24
+ response: z.ZodObject<{
25
+ uuid: z.ZodString;
26
+ name: z.ZodString;
27
+ faviconLink: z.ZodNullable<z.ZodString>;
28
+ loginUrl: z.ZodNullable<z.ZodString>;
29
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
30
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
31
+ billingHistory: z.ZodObject<{
32
+ totalAmount: z.ZodNumber;
33
+ totalBills: z.ZodNumber;
34
+ }, "strip", z.ZodTypeAny, {
35
+ totalAmount: number;
36
+ totalBills: number;
37
+ }, {
38
+ totalAmount: number;
39
+ totalBills: number;
40
+ }>;
41
+ billingNodes: z.ZodArray<z.ZodObject<{
42
+ nodeUuid: z.ZodString;
43
+ name: z.ZodString;
44
+ countryCode: z.ZodString;
45
+ }, "strip", z.ZodTypeAny, {
46
+ name: string;
47
+ countryCode: string;
48
+ nodeUuid: string;
49
+ }, {
50
+ name: string;
51
+ countryCode: string;
52
+ nodeUuid: string;
53
+ }>, "many">;
54
+ }, "strip", z.ZodTypeAny, {
55
+ uuid: string;
56
+ createdAt: Date;
57
+ updatedAt: Date;
58
+ name: string;
59
+ faviconLink: string | null;
60
+ loginUrl: string | null;
61
+ billingHistory: {
62
+ totalAmount: number;
63
+ totalBills: number;
64
+ };
65
+ billingNodes: {
66
+ name: string;
67
+ countryCode: string;
68
+ nodeUuid: string;
69
+ }[];
70
+ }, {
71
+ uuid: string;
72
+ createdAt: string;
73
+ updatedAt: string;
74
+ name: string;
75
+ faviconLink: string | null;
76
+ loginUrl: string | null;
77
+ billingHistory: {
78
+ totalAmount: number;
79
+ totalBills: number;
80
+ };
81
+ billingNodes: {
82
+ name: string;
83
+ countryCode: string;
84
+ nodeUuid: string;
85
+ }[];
86
+ }>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ response: {
89
+ uuid: string;
90
+ createdAt: Date;
91
+ updatedAt: Date;
92
+ name: string;
93
+ faviconLink: string | null;
94
+ loginUrl: string | null;
95
+ billingHistory: {
96
+ totalAmount: number;
97
+ totalBills: number;
98
+ };
99
+ billingNodes: {
100
+ name: string;
101
+ countryCode: string;
102
+ nodeUuid: string;
103
+ }[];
104
+ };
105
+ }, {
106
+ response: {
107
+ uuid: string;
108
+ createdAt: string;
109
+ updatedAt: string;
110
+ name: string;
111
+ faviconLink: string | null;
112
+ loginUrl: string | null;
113
+ billingHistory: {
114
+ totalAmount: number;
115
+ totalBills: number;
116
+ };
117
+ billingNodes: {
118
+ name: string;
119
+ countryCode: string;
120
+ nodeUuid: string;
121
+ }[];
122
+ };
123
+ }>;
124
+ type Response = z.infer<typeof ResponseSchema>;
125
+ }
126
+ //# sourceMappingURL=update-infra-provider.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-infra-provider.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/update-infra-provider.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,GAAG,gCAAyC,CAAC;IACnD,MAAM,OAAO,gCAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;MASxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateInfraProviderCommand = 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 UpdateInfraProviderCommand;
9
+ (function (UpdateInfraProviderCommand) {
10
+ UpdateInfraProviderCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_PROVIDER;
11
+ UpdateInfraProviderCommand.TSQ_url = UpdateInfraProviderCommand.url;
12
+ UpdateInfraProviderCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_PROVIDER, 'patch', 'Update infra provider');
13
+ UpdateInfraProviderCommand.RequestSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ name: zod_1.z
16
+ .string()
17
+ .min(2, 'Name must be at least 2 characters')
18
+ .max(30, 'Name must be less than 255 characters')
19
+ .optional(),
20
+ faviconLink: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().url())),
21
+ loginUrl: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().url())),
22
+ });
23
+ UpdateInfraProviderCommand.ResponseSchema = zod_1.z.object({
24
+ response: models_1.InfraProviderSchema,
25
+ });
26
+ })(UpdateInfraProviderCommand || (exports.UpdateInfraProviderCommand = UpdateInfraProviderCommand = {}));
@@ -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
  });