@remnawave/backend-contract 2.0.0-alpha.16 → 2.0.0-alpha.18

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 (25) hide show
  1. package/build/backend/api/controllers/infra-billing.d.ts +1 -1
  2. package/build/backend/api/controllers/infra-billing.d.ts.map +1 -1
  3. package/build/backend/api/controllers/infra-billing.js +1 -5
  4. package/build/backend/api/routes.d.ts +1 -1
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +1 -1
  7. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +33 -0
  8. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -1
  9. package/build/backend/commands/infra-billing/create-billing-node.command.js +5 -0
  10. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +33 -0
  11. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -1
  12. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.js +5 -0
  13. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts +33 -0
  14. package/build/backend/commands/infra-billing/get-blling-nodes.command.d.ts.map +1 -1
  15. package/build/backend/commands/infra-billing/get-blling-nodes.command.js +5 -0
  16. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +38 -5
  17. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -1
  18. package/build/backend/commands/infra-billing/update-billing-node.command.js +8 -4
  19. package/build/frontend/api/controllers/infra-billing.js +1 -5
  20. package/build/frontend/api/routes.js +1 -1
  21. package/build/frontend/commands/infra-billing/create-billing-node.command.js +5 -0
  22. package/build/frontend/commands/infra-billing/delete-billing-node-by-uuid.command.js +5 -0
  23. package/build/frontend/commands/infra-billing/get-blling-nodes.command.js +5 -0
  24. package/build/frontend/commands/infra-billing/update-billing-node.command.js +8 -4
  25. package/package.json +1 -1
@@ -7,7 +7,7 @@ export declare const INFRA_BILLING_ROUTES: {
7
7
  readonly GET_PROVIDER_BY_UUID: (uuid: string) => string;
8
8
  readonly GET_BILLING_NODES: "nodes";
9
9
  readonly CREATE_BILLING_NODE: "nodes";
10
- readonly UPDATE_BILLING_NODE: (uuid: string) => string;
10
+ readonly UPDATE_BILLING_NODE: "nodes";
11
11
  readonly DELETE_BILLING_NODE: (uuid: string) => string;
12
12
  readonly GET_BILLING_HISTORY: "history";
13
13
  readonly CREATE_BILLING_HISTORY: "history";
@@ -1 +1 @@
1
- {"version":3,"file":"infra-billing.d.ts","sourceRoot":"","sources":["../../../../api/controllers/infra-billing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,EAAG,eAAwB,CAAC;AAEjE,eAAO,MAAM,oBAAoB;;;;qCAIL,MAAM;0CACD,MAAM;;;yCAIP,MAAM;yCACN,MAAM;;;4CAIH,MAAM;CAM/B,CAAC"}
1
+ {"version":3,"file":"infra-billing.d.ts","sourceRoot":"","sources":["../../../../api/controllers/infra-billing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,EAAG,eAAwB,CAAC;AAEjE,eAAO,MAAM,oBAAoB;;;;qCAIL,MAAM;0CACD,MAAM;;;;yCAKP,MAAM;;;4CAIH,MAAM;CAC/B,CAAC"}
@@ -10,13 +10,9 @@ exports.INFRA_BILLING_ROUTES = {
10
10
  GET_PROVIDER_BY_UUID: (uuid) => `providers/${uuid}`, // Get provider by uuid // get
11
11
  GET_BILLING_NODES: 'nodes', // Get list of all nodes billing // get
12
12
  CREATE_BILLING_NODE: 'nodes', // Create new node billing // post
13
- UPDATE_BILLING_NODE: (uuid) => `nodes/${uuid}`, // Update node billing by uuid // patch
13
+ UPDATE_BILLING_NODE: 'nodes', // Update node billing by uuid // patch
14
14
  DELETE_BILLING_NODE: (uuid) => `nodes/${uuid}`, // Delete node billing by uuid // delete
15
15
  GET_BILLING_HISTORY: 'history', // Get list of all nodes billing history // get
16
16
  CREATE_BILLING_HISTORY: 'history', // Create new node billing history // post
17
17
  DELETE_BILLING_HISTORY: (uuid) => `history/${uuid}`, // Delete node billing history by uuid // delete
18
- // GET_BILLING_HISTORY_BY_NODE_UUID: (nodeUuid: string) => `history/${nodeUuid}`, // Get list of all nodes billing history by node uuid // get
19
- // GET_BILLING_HISTORY_BY_PROVIDER_UUID: (providerUuid: string) => `history/${providerUuid}`, // Get list of all nodes billing history by provider uuid // get
20
- // GET_BILLING_HISTORY_BY_NODE_UUID_AND_PROVIDER_UUID: (nodeUuid: string, providerUuid: string) =>
21
- // `history/${nodeUuid}/${providerUuid}`, // Get list of all nodes billing history by node uuid and provider uuid // get
22
18
  };
@@ -150,7 +150,7 @@ export declare const REST_API: {
150
150
  readonly GET_PROVIDER_BY_UUID: (uuid: string) => string;
151
151
  readonly GET_BILLING_NODES: "/api/infra-billing/nodes";
152
152
  readonly CREATE_BILLING_NODE: "/api/infra-billing/nodes";
153
- readonly UPDATE_BILLING_NODE: (uuid: string) => string;
153
+ readonly UPDATE_BILLING_NODE: "/api/infra-billing/nodes";
154
154
  readonly DELETE_BILLING_NODE: (uuid: string) => string;
155
155
  readonly GET_BILLING_HISTORY: "/api/infra-billing/history";
156
156
  readonly CREATE_BILLING_HISTORY: "/api/infra-billing/history";
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;gCAYE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;;qCAIX,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;qCAuBD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;;;;;qCAUX,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;;;;;;yCAUG,MAAM;8CAED,MAAM;;;6CAKP,MAAM;6CAEN,MAAM;;;gDAKH,MAAM;;CAGnC,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;gCAYE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;;qCAIX,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;qCAuBD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;;;;;qCAUX,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;;;;;;yCAUG,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;CAGnC,CAAC"}
@@ -187,7 +187,7 @@ exports.REST_API = {
187
187
  GET_PROVIDER_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDER_BY_UUID(uuid)}`,
188
188
  GET_BILLING_NODES: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_NODES}`,
189
189
  CREATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE}`,
190
- UPDATE_BILLING_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE(uuid)}`,
190
+ UPDATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE}`,
191
191
  DELETE_BILLING_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_NODE(uuid)}`,
192
192
  GET_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_HISTORY}`,
193
193
  CREATE_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY}`,
@@ -261,7 +261,25 @@ export declare namespace CreateInfraBillingNodeCommand {
261
261
  countryCode: string;
262
262
  }>, "many">;
263
263
  totalAvailableBillingNodes: z.ZodNumber;
264
+ stats: z.ZodObject<{
265
+ upcomingNodesCount: z.ZodNumber;
266
+ currentMonthPayments: z.ZodNumber;
267
+ totalSpent: z.ZodNumber;
268
+ }, "strip", z.ZodTypeAny, {
269
+ upcomingNodesCount: number;
270
+ currentMonthPayments: number;
271
+ totalSpent: number;
272
+ }, {
273
+ upcomingNodesCount: number;
274
+ currentMonthPayments: number;
275
+ totalSpent: number;
276
+ }>;
264
277
  }, "strip", z.ZodTypeAny, {
278
+ stats: {
279
+ upcomingNodesCount: number;
280
+ currentMonthPayments: number;
281
+ totalSpent: number;
282
+ };
265
283
  billingNodes: {
266
284
  uuid: string;
267
285
  createdAt: Date;
@@ -289,6 +307,11 @@ export declare namespace CreateInfraBillingNodeCommand {
289
307
  }[];
290
308
  totalAvailableBillingNodes: number;
291
309
  }, {
310
+ stats: {
311
+ upcomingNodesCount: number;
312
+ currentMonthPayments: number;
313
+ totalSpent: number;
314
+ };
292
315
  billingNodes: {
293
316
  uuid: string;
294
317
  createdAt: string;
@@ -318,6 +341,11 @@ export declare namespace CreateInfraBillingNodeCommand {
318
341
  }>;
319
342
  }, "strip", z.ZodTypeAny, {
320
343
  response: {
344
+ stats: {
345
+ upcomingNodesCount: number;
346
+ currentMonthPayments: number;
347
+ totalSpent: number;
348
+ };
321
349
  billingNodes: {
322
350
  uuid: string;
323
351
  createdAt: Date;
@@ -347,6 +375,11 @@ export declare namespace CreateInfraBillingNodeCommand {
347
375
  };
348
376
  }, {
349
377
  response: {
378
+ stats: {
379
+ upcomingNodesCount: number;
380
+ currentMonthPayments: number;
381
+ totalSpent: number;
382
+ };
350
383
  billingNodes: {
351
384
  uuid: string;
352
385
  createdAt: string;
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
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"}
@@ -28,6 +28,11 @@ var CreateInfraBillingNodeCommand;
28
28
  billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
29
29
  availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
30
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
+ }),
31
36
  }),
32
37
  });
33
38
  })(CreateInfraBillingNodeCommand || (exports.CreateInfraBillingNodeCommand = CreateInfraBillingNodeCommand = {}));
@@ -255,7 +255,25 @@ export declare namespace DeleteInfraBillingNodeByUuidCommand {
255
255
  countryCode: string;
256
256
  }>, "many">;
257
257
  totalAvailableBillingNodes: z.ZodNumber;
258
+ stats: z.ZodObject<{
259
+ upcomingNodesCount: z.ZodNumber;
260
+ currentMonthPayments: z.ZodNumber;
261
+ totalSpent: z.ZodNumber;
262
+ }, "strip", z.ZodTypeAny, {
263
+ upcomingNodesCount: number;
264
+ currentMonthPayments: number;
265
+ totalSpent: number;
266
+ }, {
267
+ upcomingNodesCount: number;
268
+ currentMonthPayments: number;
269
+ totalSpent: number;
270
+ }>;
258
271
  }, "strip", z.ZodTypeAny, {
272
+ stats: {
273
+ upcomingNodesCount: number;
274
+ currentMonthPayments: number;
275
+ totalSpent: number;
276
+ };
259
277
  billingNodes: {
260
278
  uuid: string;
261
279
  createdAt: Date;
@@ -283,6 +301,11 @@ export declare namespace DeleteInfraBillingNodeByUuidCommand {
283
301
  }[];
284
302
  totalAvailableBillingNodes: number;
285
303
  }, {
304
+ stats: {
305
+ upcomingNodesCount: number;
306
+ currentMonthPayments: number;
307
+ totalSpent: number;
308
+ };
286
309
  billingNodes: {
287
310
  uuid: string;
288
311
  createdAt: string;
@@ -312,6 +335,11 @@ export declare namespace DeleteInfraBillingNodeByUuidCommand {
312
335
  }>;
313
336
  }, "strip", z.ZodTypeAny, {
314
337
  response: {
338
+ stats: {
339
+ upcomingNodesCount: number;
340
+ currentMonthPayments: number;
341
+ totalSpent: number;
342
+ };
315
343
  billingNodes: {
316
344
  uuid: string;
317
345
  createdAt: Date;
@@ -341,6 +369,11 @@ export declare namespace DeleteInfraBillingNodeByUuidCommand {
341
369
  };
342
370
  }, {
343
371
  response: {
372
+ stats: {
373
+ upcomingNodesCount: number;
374
+ currentMonthPayments: number;
375
+ totalSpent: number;
376
+ };
344
377
  billingNodes: {
345
378
  uuid: string;
346
379
  createdAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"delete-billing-node-by-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/delete-billing-node-by-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,mCAAmC,CAAC;IAC1C,MAAM,GAAG,QAAsD,CAAC;IAChE,MAAM,OAAO,QAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"delete-billing-node-by-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/delete-billing-node-by-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,mCAAmC,CAAC;IAC1C,MAAM,GAAG,QAAsD,CAAC;IAChE,MAAM,OAAO,QAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,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"}
@@ -19,6 +19,11 @@ var DeleteInfraBillingNodeByUuidCommand;
19
19
  billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
20
20
  availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
21
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
+ }),
22
27
  }),
23
28
  });
24
29
  })(DeleteInfraBillingNodeByUuidCommand || (exports.DeleteInfraBillingNodeByUuidCommand = DeleteInfraBillingNodeByUuidCommand = {}));
@@ -247,7 +247,25 @@ export declare namespace GetInfraBillingNodesCommand {
247
247
  countryCode: string;
248
248
  }>, "many">;
249
249
  totalAvailableBillingNodes: z.ZodNumber;
250
+ stats: z.ZodObject<{
251
+ upcomingNodesCount: z.ZodNumber;
252
+ currentMonthPayments: z.ZodNumber;
253
+ totalSpent: z.ZodNumber;
254
+ }, "strip", z.ZodTypeAny, {
255
+ upcomingNodesCount: number;
256
+ currentMonthPayments: number;
257
+ totalSpent: number;
258
+ }, {
259
+ upcomingNodesCount: number;
260
+ currentMonthPayments: number;
261
+ totalSpent: number;
262
+ }>;
250
263
  }, "strip", z.ZodTypeAny, {
264
+ stats: {
265
+ upcomingNodesCount: number;
266
+ currentMonthPayments: number;
267
+ totalSpent: number;
268
+ };
251
269
  billingNodes: {
252
270
  uuid: string;
253
271
  createdAt: Date;
@@ -275,6 +293,11 @@ export declare namespace GetInfraBillingNodesCommand {
275
293
  }[];
276
294
  totalAvailableBillingNodes: number;
277
295
  }, {
296
+ stats: {
297
+ upcomingNodesCount: number;
298
+ currentMonthPayments: number;
299
+ totalSpent: number;
300
+ };
278
301
  billingNodes: {
279
302
  uuid: string;
280
303
  createdAt: string;
@@ -304,6 +327,11 @@ export declare namespace GetInfraBillingNodesCommand {
304
327
  }>;
305
328
  }, "strip", z.ZodTypeAny, {
306
329
  response: {
330
+ stats: {
331
+ upcomingNodesCount: number;
332
+ currentMonthPayments: number;
333
+ totalSpent: number;
334
+ };
307
335
  billingNodes: {
308
336
  uuid: string;
309
337
  createdAt: Date;
@@ -333,6 +361,11 @@ export declare namespace GetInfraBillingNodesCommand {
333
361
  };
334
362
  }, {
335
363
  response: {
364
+ stats: {
365
+ upcomingNodesCount: number;
366
+ currentMonthPayments: number;
367
+ totalSpent: number;
368
+ };
336
369
  billingNodes: {
337
370
  uuid: string;
338
371
  createdAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"get-blling-nodes.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/get-blling-nodes.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,4BAA2C,CAAC;IACrD,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-blling-nodes.command.d.ts","sourceRoot":"","sources":["../../../../commands/infra-billing/get-blling-nodes.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,4BAA2C,CAAC;IACrD,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -16,6 +16,11 @@ var GetInfraBillingNodesCommand;
16
16
  billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
17
17
  availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
18
18
  totalAvailableBillingNodes: zod_1.z.number(),
19
+ stats: zod_1.z.object({
20
+ upcomingNodesCount: zod_1.z.number(),
21
+ currentMonthPayments: zod_1.z.number(),
22
+ totalSpent: zod_1.z.number(),
23
+ }),
19
24
  }),
20
25
  });
21
26
  })(GetInfraBillingNodesCommand || (exports.GetInfraBillingNodesCommand = GetInfraBillingNodesCommand = {}));
@@ -1,17 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  export declare namespace UpdateInfraBillingNodeCommand {
3
- const url: string;
4
- const TSQ_url: string;
3
+ const url: "/api/infra-billing/nodes";
4
+ const TSQ_url: "/api/infra-billing/nodes";
5
5
  const endpointDetails: import("../../constants").EndpointDetails;
6
6
  const RequestSchema: z.ZodObject<{
7
7
  uuid: z.ZodString;
8
- nextBillingAt: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
8
+ nextBillingAt: z.ZodEffects<z.ZodString, Date, string>;
9
9
  }, "strip", z.ZodTypeAny, {
10
10
  uuid: string;
11
- nextBillingAt?: Date | undefined;
11
+ nextBillingAt: Date;
12
12
  }, {
13
13
  uuid: string;
14
- nextBillingAt?: string | undefined;
14
+ nextBillingAt: string;
15
15
  }>;
16
16
  type Request = z.infer<typeof RequestSchema>;
17
17
  const ResponseSchema: z.ZodObject<{
@@ -258,7 +258,25 @@ export declare namespace UpdateInfraBillingNodeCommand {
258
258
  countryCode: string;
259
259
  }>, "many">;
260
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
+ }>;
261
274
  }, "strip", z.ZodTypeAny, {
275
+ stats: {
276
+ upcomingNodesCount: number;
277
+ currentMonthPayments: number;
278
+ totalSpent: number;
279
+ };
262
280
  billingNodes: {
263
281
  uuid: string;
264
282
  createdAt: Date;
@@ -286,6 +304,11 @@ export declare namespace UpdateInfraBillingNodeCommand {
286
304
  }[];
287
305
  totalAvailableBillingNodes: number;
288
306
  }, {
307
+ stats: {
308
+ upcomingNodesCount: number;
309
+ currentMonthPayments: number;
310
+ totalSpent: number;
311
+ };
289
312
  billingNodes: {
290
313
  uuid: string;
291
314
  createdAt: string;
@@ -315,6 +338,11 @@ export declare namespace UpdateInfraBillingNodeCommand {
315
338
  }>;
316
339
  }, "strip", z.ZodTypeAny, {
317
340
  response: {
341
+ stats: {
342
+ upcomingNodesCount: number;
343
+ currentMonthPayments: number;
344
+ totalSpent: number;
345
+ };
318
346
  billingNodes: {
319
347
  uuid: string;
320
348
  createdAt: Date;
@@ -344,6 +372,11 @@ export declare namespace UpdateInfraBillingNodeCommand {
344
372
  };
345
373
  }, {
346
374
  response: {
375
+ stats: {
376
+ upcomingNodesCount: number;
377
+ currentMonthPayments: number;
378
+ totalSpent: number;
379
+ };
347
380
  billingNodes: {
348
381
  uuid: string;
349
382
  createdAt: string;
@@ -1 +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,QAAsD,CAAC;IAChE,MAAM,OAAO,QAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
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"}
@@ -7,9 +7,9 @@ const api_1 = require("../../api");
7
7
  const constants_1 = require("../../constants");
8
8
  var UpdateInfraBillingNodeCommand;
9
9
  (function (UpdateInfraBillingNodeCommand) {
10
- UpdateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_BILLING_NODE(':uuid');
10
+ UpdateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_BILLING_NODE;
11
11
  UpdateInfraBillingNodeCommand.TSQ_url = UpdateInfraBillingNodeCommand.url;
12
- UpdateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE(':uuid'), 'patch', 'Update infra billing node');
12
+ UpdateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE, 'patch', 'Update infra billing node');
13
13
  UpdateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
14
14
  uuid: zod_1.z.string().uuid(),
15
15
  nextBillingAt: zod_1.z
@@ -17,8 +17,7 @@ var UpdateInfraBillingNodeCommand;
17
17
  invalid_type_error: 'Invalid date format',
18
18
  })
19
19
  .datetime({ message: 'Invalid date format', offset: true, local: true })
20
- .transform((str) => new Date(str))
21
- .optional(),
20
+ .transform((str) => new Date(str)),
22
21
  });
23
22
  UpdateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
24
23
  response: zod_1.z.object({
@@ -26,6 +25,11 @@ var UpdateInfraBillingNodeCommand;
26
25
  billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
27
26
  availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
28
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
+ }),
29
33
  }),
30
34
  });
31
35
  })(UpdateInfraBillingNodeCommand || (exports.UpdateInfraBillingNodeCommand = UpdateInfraBillingNodeCommand = {}));
@@ -10,13 +10,9 @@ exports.INFRA_BILLING_ROUTES = {
10
10
  GET_PROVIDER_BY_UUID: (uuid) => `providers/${uuid}`, // Get provider by uuid // get
11
11
  GET_BILLING_NODES: 'nodes', // Get list of all nodes billing // get
12
12
  CREATE_BILLING_NODE: 'nodes', // Create new node billing // post
13
- UPDATE_BILLING_NODE: (uuid) => `nodes/${uuid}`, // Update node billing by uuid // patch
13
+ UPDATE_BILLING_NODE: 'nodes', // Update node billing by uuid // patch
14
14
  DELETE_BILLING_NODE: (uuid) => `nodes/${uuid}`, // Delete node billing by uuid // delete
15
15
  GET_BILLING_HISTORY: 'history', // Get list of all nodes billing history // get
16
16
  CREATE_BILLING_HISTORY: 'history', // Create new node billing history // post
17
17
  DELETE_BILLING_HISTORY: (uuid) => `history/${uuid}`, // Delete node billing history by uuid // delete
18
- // GET_BILLING_HISTORY_BY_NODE_UUID: (nodeUuid: string) => `history/${nodeUuid}`, // Get list of all nodes billing history by node uuid // get
19
- // GET_BILLING_HISTORY_BY_PROVIDER_UUID: (providerUuid: string) => `history/${providerUuid}`, // Get list of all nodes billing history by provider uuid // get
20
- // GET_BILLING_HISTORY_BY_NODE_UUID_AND_PROVIDER_UUID: (nodeUuid: string, providerUuid: string) =>
21
- // `history/${nodeUuid}/${providerUuid}`, // Get list of all nodes billing history by node uuid and provider uuid // get
22
18
  };
@@ -187,7 +187,7 @@ exports.REST_API = {
187
187
  GET_PROVIDER_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDER_BY_UUID(uuid)}`,
188
188
  GET_BILLING_NODES: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_NODES}`,
189
189
  CREATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_NODE}`,
190
- UPDATE_BILLING_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE(uuid)}`,
190
+ UPDATE_BILLING_NODE: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE}`,
191
191
  DELETE_BILLING_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.DELETE_BILLING_NODE(uuid)}`,
192
192
  GET_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_BILLING_HISTORY}`,
193
193
  CREATE_BILLING_HISTORY: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.CREATE_BILLING_HISTORY}`,
@@ -28,6 +28,11 @@ var CreateInfraBillingNodeCommand;
28
28
  billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
29
29
  availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
30
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
+ }),
31
36
  }),
32
37
  });
33
38
  })(CreateInfraBillingNodeCommand || (exports.CreateInfraBillingNodeCommand = CreateInfraBillingNodeCommand = {}));
@@ -19,6 +19,11 @@ var DeleteInfraBillingNodeByUuidCommand;
19
19
  billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
20
20
  availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
21
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
+ }),
22
27
  }),
23
28
  });
24
29
  })(DeleteInfraBillingNodeByUuidCommand || (exports.DeleteInfraBillingNodeByUuidCommand = DeleteInfraBillingNodeByUuidCommand = {}));
@@ -16,6 +16,11 @@ var GetInfraBillingNodesCommand;
16
16
  billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
17
17
  availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
18
18
  totalAvailableBillingNodes: zod_1.z.number(),
19
+ stats: zod_1.z.object({
20
+ upcomingNodesCount: zod_1.z.number(),
21
+ currentMonthPayments: zod_1.z.number(),
22
+ totalSpent: zod_1.z.number(),
23
+ }),
19
24
  }),
20
25
  });
21
26
  })(GetInfraBillingNodesCommand || (exports.GetInfraBillingNodesCommand = GetInfraBillingNodesCommand = {}));
@@ -7,9 +7,9 @@ const api_1 = require("../../api");
7
7
  const constants_1 = require("../../constants");
8
8
  var UpdateInfraBillingNodeCommand;
9
9
  (function (UpdateInfraBillingNodeCommand) {
10
- UpdateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_BILLING_NODE(':uuid');
10
+ UpdateInfraBillingNodeCommand.url = api_1.REST_API.INFRA_BILLING.UPDATE_BILLING_NODE;
11
11
  UpdateInfraBillingNodeCommand.TSQ_url = UpdateInfraBillingNodeCommand.url;
12
- UpdateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE(':uuid'), 'patch', 'Update infra billing node');
12
+ UpdateInfraBillingNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INFRA_BILLING_ROUTES.UPDATE_BILLING_NODE, 'patch', 'Update infra billing node');
13
13
  UpdateInfraBillingNodeCommand.RequestSchema = zod_1.z.object({
14
14
  uuid: zod_1.z.string().uuid(),
15
15
  nextBillingAt: zod_1.z
@@ -17,8 +17,7 @@ var UpdateInfraBillingNodeCommand;
17
17
  invalid_type_error: 'Invalid date format',
18
18
  })
19
19
  .datetime({ message: 'Invalid date format', offset: true, local: true })
20
- .transform((str) => new Date(str))
21
- .optional(),
20
+ .transform((str) => new Date(str)),
22
21
  });
23
22
  UpdateInfraBillingNodeCommand.ResponseSchema = zod_1.z.object({
24
23
  response: zod_1.z.object({
@@ -26,6 +25,11 @@ var UpdateInfraBillingNodeCommand;
26
25
  billingNodes: zod_1.z.array(models_1.InfraBillingNodeSchema),
27
26
  availableBillingNodes: zod_1.z.array(models_1.InfraBillingAvailableNodeSchema),
28
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
+ }),
29
33
  }),
30
34
  });
31
35
  })(UpdateInfraBillingNodeCommand || (exports.UpdateInfraBillingNodeCommand = UpdateInfraBillingNodeCommand = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.0.0-alpha.16",
3
+ "version": "2.0.0-alpha.18",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",