@remnawave/backend-contract 2.3.66 → 2.3.68

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 (117) hide show
  1. package/build/backend/api/controllers/bandwidth-stats.d.ts +22 -0
  2. package/build/backend/api/controllers/bandwidth-stats.d.ts.map +1 -0
  3. package/build/backend/api/controllers/bandwidth-stats.js +34 -0
  4. package/build/backend/api/controllers/index.d.ts +1 -0
  5. package/build/backend/api/controllers/index.d.ts.map +1 -1
  6. package/build/backend/api/controllers/index.js +1 -0
  7. package/build/backend/api/controllers/nodes.d.ts +0 -5
  8. package/build/backend/api/controllers/nodes.d.ts.map +1 -1
  9. package/build/backend/api/controllers/nodes.js +0 -5
  10. package/build/backend/api/controllers/users.d.ts +0 -3
  11. package/build/backend/api/controllers/users.d.ts.map +1 -1
  12. package/build/backend/api/controllers/users.js +0 -3
  13. package/build/backend/api/controllers-info.d.ts +8 -12
  14. package/build/backend/api/controllers-info.d.ts.map +1 -1
  15. package/build/backend/api/controllers-info.js +8 -12
  16. package/build/backend/api/routes.d.ts +18 -8
  17. package/build/backend/api/routes.d.ts.map +1 -1
  18. package/build/backend/api/routes.js +18 -8
  19. package/build/backend/commands/bandwidth-stats/index.d.ts +4 -0
  20. package/build/backend/commands/bandwidth-stats/index.d.ts.map +1 -0
  21. package/build/{frontend/commands/nodes/stats → backend/commands/bandwidth-stats}/index.js +3 -3
  22. package/build/backend/commands/{nodes/stats/get-node-user-usage-by-range.command.d.ts → bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.d.ts} +2 -2
  23. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.d.ts.map +1 -0
  24. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.js +28 -0
  25. package/build/backend/commands/{users/get-user-usage-by-range.command.d.ts → bandwidth-stats/legacy/get-legacy-user-usage.command.d.ts} +11 -11
  26. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.d.ts.map +1 -0
  27. package/build/backend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.js +29 -0
  28. package/build/backend/commands/bandwidth-stats/legacy/index.d.ts +3 -0
  29. package/build/backend/commands/bandwidth-stats/legacy/index.d.ts.map +1 -0
  30. package/build/backend/commands/{nodes/stats → bandwidth-stats/legacy}/index.js +2 -3
  31. package/build/backend/commands/{nodes/stats/get-realtime-usage.command.d.ts → bandwidth-stats/nodes/get-stats-nodes-realtime-usage.command.d.ts} +8 -8
  32. package/build/backend/commands/bandwidth-stats/nodes/get-stats-nodes-realtime-usage.command.d.ts.map +1 -0
  33. package/build/backend/commands/bandwidth-stats/nodes/get-stats-nodes-realtime-usage.command.js +25 -0
  34. package/build/backend/commands/{nodes/stats/get-nodes-usage-by-range.command.d.ts → bandwidth-stats/nodes/get-stats-nodes-usage.command.d.ts} +28 -28
  35. package/build/backend/commands/bandwidth-stats/nodes/get-stats-nodes-usage.command.d.ts.map +1 -0
  36. package/build/backend/commands/{nodes/stats/get-nodes-usage-by-range.command.js → bandwidth-stats/nodes/get-stats-nodes-usage.command.js} +10 -10
  37. package/build/backend/commands/bandwidth-stats/nodes/index.d.ts +3 -0
  38. package/build/backend/commands/bandwidth-stats/nodes/index.d.ts.map +1 -0
  39. package/build/backend/commands/bandwidth-stats/nodes/index.js +18 -0
  40. package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.d.ts +150 -0
  41. package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.d.ts.map +1 -0
  42. package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.js +40 -0
  43. package/build/backend/commands/bandwidth-stats/users/index.d.ts +2 -0
  44. package/build/backend/commands/bandwidth-stats/users/index.d.ts.map +1 -0
  45. package/build/backend/commands/bandwidth-stats/users/index.js +17 -0
  46. package/build/backend/commands/config-profiles/actions/reorder.command.d.ts +10 -10
  47. package/build/backend/commands/config-profiles/create-config-profile.command.d.ts +6 -6
  48. package/build/backend/commands/config-profiles/get-computed-config-profile-by-uuid.command.d.ts +6 -6
  49. package/build/backend/commands/config-profiles/get-config-profile-by-uuid.command.d.ts +6 -6
  50. package/build/backend/commands/config-profiles/get-config-profiles.command.d.ts +8 -8
  51. package/build/backend/commands/config-profiles/update-config-profile.command.d.ts +6 -6
  52. package/build/backend/commands/index.d.ts +1 -0
  53. package/build/backend/commands/index.d.ts.map +1 -1
  54. package/build/backend/commands/index.js +1 -0
  55. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +16 -16
  56. package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +12 -12
  57. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +16 -16
  58. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +16 -16
  59. package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +12 -12
  60. package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +16 -16
  61. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +16 -16
  62. package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +12 -12
  63. package/build/backend/commands/internal-squads/get-internal-squad-accessible-nodes.command.d.ts +6 -6
  64. package/build/backend/commands/nodes/actions/disable.command.d.ts +4 -4
  65. package/build/backend/commands/nodes/actions/enable.command.d.ts +4 -4
  66. package/build/backend/commands/nodes/actions/reorder.command.d.ts +4 -4
  67. package/build/backend/commands/nodes/create.command.d.ts +6 -6
  68. package/build/backend/commands/nodes/get-all.command.d.ts +4 -4
  69. package/build/backend/commands/nodes/get-one.command.d.ts +4 -4
  70. package/build/backend/commands/nodes/index.d.ts +0 -1
  71. package/build/backend/commands/nodes/index.d.ts.map +1 -1
  72. package/build/backend/commands/nodes/index.js +0 -1
  73. package/build/backend/commands/nodes/update.command.d.ts +6 -6
  74. package/build/backend/commands/subscription-template/actions/reorder.command.d.ts +4 -4
  75. package/build/backend/commands/subscription-template/get-templates.command.d.ts +4 -4
  76. package/build/backend/commands/system/get-nodes-metrics.command.d.ts +6 -6
  77. package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +6 -6
  78. package/build/backend/commands/users/index.d.ts +0 -1
  79. package/build/backend/commands/users/index.d.ts.map +1 -1
  80. package/build/backend/commands/users/index.js +0 -1
  81. package/build/backend/models/config-profile.schema.d.ts +4 -4
  82. package/build/backend/models/infra-billing-available-node.schema.d.ts +3 -3
  83. package/build/backend/models/infra-billing-node.schema.d.ts +5 -5
  84. package/build/backend/models/infra-provider.schema.d.ts +8 -8
  85. package/build/backend/models/last-connected-node.schema.d.ts +2 -2
  86. package/build/backend/models/nodes.schema.d.ts +2 -2
  87. package/build/frontend/api/controllers/bandwidth-stats.js +34 -0
  88. package/build/frontend/api/controllers/index.js +1 -0
  89. package/build/frontend/api/controllers/nodes.js +0 -5
  90. package/build/frontend/api/controllers/users.js +0 -3
  91. package/build/frontend/api/controllers-info.js +8 -12
  92. package/build/frontend/api/routes.js +18 -8
  93. package/build/frontend/commands/bandwidth-stats/index.js +19 -0
  94. package/build/frontend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.js +28 -0
  95. package/build/frontend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.js +29 -0
  96. package/build/frontend/commands/bandwidth-stats/legacy/index.js +18 -0
  97. package/build/frontend/commands/bandwidth-stats/nodes/get-stats-nodes-realtime-usage.command.js +25 -0
  98. package/build/frontend/commands/{nodes/stats/get-nodes-usage-by-range.command.js → bandwidth-stats/nodes/get-stats-nodes-usage.command.js} +10 -10
  99. package/build/frontend/commands/bandwidth-stats/nodes/index.js +18 -0
  100. package/build/frontend/commands/bandwidth-stats/users/get-stats-user-usage.command.js +40 -0
  101. package/build/frontend/commands/bandwidth-stats/users/index.js +17 -0
  102. package/build/frontend/commands/index.js +1 -0
  103. package/build/frontend/commands/nodes/index.js +0 -1
  104. package/build/frontend/commands/users/index.js +0 -1
  105. package/package.json +1 -1
  106. package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.d.ts.map +0 -1
  107. package/build/backend/commands/nodes/stats/get-node-user-usage-by-range.command.js +0 -28
  108. package/build/backend/commands/nodes/stats/get-nodes-usage-by-range.command.d.ts.map +0 -1
  109. package/build/backend/commands/nodes/stats/get-realtime-usage.command.d.ts.map +0 -1
  110. package/build/backend/commands/nodes/stats/get-realtime-usage.command.js +0 -25
  111. package/build/backend/commands/nodes/stats/index.d.ts +0 -4
  112. package/build/backend/commands/nodes/stats/index.d.ts.map +0 -1
  113. package/build/backend/commands/users/get-user-usage-by-range.command.d.ts.map +0 -1
  114. package/build/backend/commands/users/get-user-usage-by-range.command.js +0 -29
  115. package/build/frontend/commands/nodes/stats/get-node-user-usage-by-range.command.js +0 -28
  116. package/build/frontend/commands/nodes/stats/get-realtime-usage.command.js +0 -25
  117. package/build/frontend/commands/users/get-user-usage-by-range.command.js +0 -29
@@ -0,0 +1,22 @@
1
+ export declare const BANDWIDTH_STATS_CONTROLLER: "bandwidth-stats";
2
+ export declare const BANDWIDTH_STATS_NODES_CONTROLLER: "bandwidth-stats/nodes";
3
+ export declare const BANDWIDTH_STATS_USERS_CONTROLLER: "bandwidth-stats/users";
4
+ export declare const BANDWIDTH_STATS_ROUTES: {
5
+ readonly NODES: {
6
+ readonly GET: "";
7
+ readonly GET_REALTIME: "realtime";
8
+ readonly GET_USERS: (uuid: string) => string;
9
+ };
10
+ readonly USERS: {
11
+ readonly GET_BY_UUID: (uuid: string) => string;
12
+ };
13
+ readonly LEGACY: {
14
+ readonly NODES: {
15
+ readonly GET_USERS: (uuid: string) => string;
16
+ };
17
+ readonly USERS: {
18
+ readonly GET_BY_UUID: (uuid: string) => string;
19
+ };
20
+ };
21
+ };
22
+ //# sourceMappingURL=bandwidth-stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bandwidth-stats.d.ts","sourceRoot":"","sources":["../../../../api/controllers/bandwidth-stats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,EAAG,iBAA0B,CAAC;AAErE,eAAO,MAAM,gCAAgC,yBAAiD,CAAC;AAC/F,eAAO,MAAM,gCAAgC,yBAAiD,CAAC;AAO/F,eAAO,MAAM,sBAAsB;;;;mCAOT,MAAM;;;qCAIJ,MAAM;;;;uCAKJ,MAAM;;;yCAIJ,MAAM;;;CAG5B,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BANDWIDTH_STATS_ROUTES = exports.BANDWIDTH_STATS_USERS_CONTROLLER = exports.BANDWIDTH_STATS_NODES_CONTROLLER = exports.BANDWIDTH_STATS_CONTROLLER = void 0;
4
+ exports.BANDWIDTH_STATS_CONTROLLER = 'bandwidth-stats';
5
+ exports.BANDWIDTH_STATS_NODES_CONTROLLER = `${exports.BANDWIDTH_STATS_CONTROLLER}/nodes`;
6
+ exports.BANDWIDTH_STATS_USERS_CONTROLLER = `${exports.BANDWIDTH_STATS_CONTROLLER}/users`;
7
+ // Variants:
8
+ // 1. Nodes -> Metrics
9
+ // 2. Nodes -> Management -> Show usage (!need legacy)
10
+ // 3. Users -> User -> Show Usage (!need legacy)
11
+ exports.BANDWIDTH_STATS_ROUTES = {
12
+ NODES: {
13
+ // GET /bandwidth-stats/nodes –– Nodes -> Metrics
14
+ GET: '',
15
+ // GET /bandwidth-stats/nodes/realtime –– Nodes -> Management -> Metric Cards
16
+ GET_REALTIME: 'realtime',
17
+ // GET /bandwidth-stats/nodes/:nodeUuid/users –– Nodes -> Management -> Show usage
18
+ GET_USERS: (uuid) => `${uuid}/users`,
19
+ },
20
+ USERS: {
21
+ // GET /bandwidth-stats/users/:userUuid –– Users -> User -> Show Usage
22
+ GET_BY_UUID: (uuid) => `${uuid}`,
23
+ },
24
+ LEGACY: {
25
+ NODES: {
26
+ // GET /bandwidth-stats/nodes/:nodeUuid/users/legacy –– Nodes -> Management -> Show usage (legacy)
27
+ GET_USERS: (uuid) => `${uuid}/users/legacy`,
28
+ },
29
+ USERS: {
30
+ // GET /bandwidth-stats/users/:userUuid/legacy –– Users -> User -> Show Usage (legacy)
31
+ GET_BY_UUID: (uuid) => `${uuid}/legacy`,
32
+ },
33
+ },
34
+ };
@@ -1,5 +1,6 @@
1
1
  export * from './api-tokens';
2
2
  export * from './auth';
3
+ export * from './bandwidth-stats';
3
4
  export * from './config-profiles';
4
5
  export * from './external-squads';
5
6
  export * from './hosts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./api-tokens"), exports);
18
18
  __exportStar(require("./auth"), exports);
19
+ __exportStar(require("./bandwidth-stats"), exports);
19
20
  __exportStar(require("./config-profiles"), exports);
20
21
  __exportStar(require("./external-squads"), exports);
21
22
  __exportStar(require("./hosts"), exports);
@@ -17,11 +17,6 @@ export declare const NODES_ROUTES: {
17
17
  readonly BULK_ACTIONS: {
18
18
  readonly PROFILE_MODIFICATION: "bulk-actions/profile-modification";
19
19
  };
20
- readonly STATS: {
21
- readonly USAGE_BY_RANGE: "usage/range";
22
- readonly USAGE_BY_RANGE_USER: (uuid: string) => string;
23
- readonly USAGE_REALTIME: "usage/realtime";
24
- };
25
20
  readonly TAGS: {
26
21
  readonly GET: "tags";
27
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../api/controllers/nodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,kBAAkB,EAAG,SAAkB,CAAC;AAGrD,eAAO,MAAM,YAAY;;;iCAGD,MAAM;;4BAEX,MAAM;;gCAGF,MAAM;iCACL,MAAM;iCACN,MAAM;uCACA,MAAM;;;;;;;;;6CAWA,MAAM;;;;;;CAOhC,CAAC"}
1
+ {"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../api/controllers/nodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,kBAAkB,EAAG,SAAkB,CAAC;AAGrD,eAAO,MAAM,YAAY;;;iCAGD,MAAM;;4BAEX,MAAM;;gCAGF,MAAM;iCACL,MAAM;iCACN,MAAM;uCACA,MAAM;;;;;;;;;;CAY1B,CAAC"}
@@ -21,11 +21,6 @@ exports.NODES_ROUTES = {
21
21
  BULK_ACTIONS: {
22
22
  PROFILE_MODIFICATION: `${BULK_ACTIONS_ROUTE}/profile-modification`,
23
23
  },
24
- STATS: {
25
- USAGE_BY_RANGE: 'usage/range',
26
- USAGE_BY_RANGE_USER: (uuid) => `usage/${uuid}/users/range`,
27
- USAGE_REALTIME: 'usage/realtime',
28
- },
29
24
  TAGS: {
30
25
  GET: 'tags',
31
26
  },
@@ -37,9 +37,6 @@ export declare const USERS_ROUTES: {
37
37
  readonly EXTEND_EXPIRATION_DATE: "bulk/all/extend-expiration-date";
38
38
  };
39
39
  };
40
- readonly STATS: {
41
- readonly GET_USAGE_BY_RANGE: (uuid: string) => string;
42
- };
43
40
  readonly TAGS: {
44
41
  readonly GET: "tags";
45
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AAEtD,eAAO,MAAM,YAAY;;;;4BAIN,MAAM;iCACD,MAAM;sCACD,MAAM;kDACM,MAAM;;gCAExB,MAAM;iCACL,MAAM;uCACA,MAAM;6CACA,MAAM;;;0BAGzB,MAAM;yCACS,MAAM;sCACT,MAAM;uDACW,MAAM;2CAClB,MAAM;gCACjB,MAAM;4BACV,MAAM;;;;;;;;;;;;;;;;;4CAmBU,MAAM;;;;;CAM/B,CAAC"}
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AAEtD,eAAO,MAAM,YAAY;;;;4BAIN,MAAM;iCACD,MAAM;sCACD,MAAM;kDACM,MAAM;;gCAExB,MAAM;iCACL,MAAM;uCACA,MAAM;6CACA,MAAM;;;0BAGzB,MAAM;yCACS,MAAM;sCACT,MAAM;uDACW,MAAM;2CAClB,MAAM;gCACjB,MAAM;4BACV,MAAM;;;;;;;;;;;;;;;;;;;CAqBf,CAAC"}
@@ -40,9 +40,6 @@ exports.USERS_ROUTES = {
40
40
  EXTEND_EXPIRATION_DATE: 'bulk/all/extend-expiration-date',
41
41
  },
42
42
  },
43
- STATS: {
44
- GET_USAGE_BY_RANGE: (uuid) => `stats/usage/${uuid}/range`,
45
- },
46
43
  TAGS: {
47
44
  GET: 'tags',
48
45
  },
@@ -19,10 +19,6 @@ export declare const CONTROLLERS_INFO: {
19
19
  readonly tag: "Users Bulk Actions Controller";
20
20
  readonly description: "Bulk actions with users.";
21
21
  };
22
- readonly USERS_STATS: {
23
- readonly tag: "Users Stats Controller";
24
- readonly description: "";
25
- };
26
22
  readonly HWID_USER_DEVICES: {
27
23
  readonly tag: "HWID User Devices Controller";
28
24
  readonly description: "";
@@ -35,6 +31,14 @@ export declare const CONTROLLERS_INFO: {
35
31
  readonly tag: "[Protected] Subscriptions Controller";
36
32
  readonly description: "Methods of this controller are protected with auth, most of them is returning the same informations as public Subscription Controller.";
37
33
  };
34
+ readonly NODES: {
35
+ readonly tag: "Nodes Controller";
36
+ readonly description: "";
37
+ };
38
+ readonly BANDWIDTH_STATS: {
39
+ readonly tag: "Bandwidth Stats Controller";
40
+ readonly description: "";
41
+ };
38
42
  readonly CONFIG_PROFILES: {
39
43
  readonly tag: "Config Profiles Controller";
40
44
  readonly description: "Management of Config Profiles.";
@@ -47,10 +51,6 @@ export declare const CONTROLLERS_INFO: {
47
51
  readonly tag: "External Squads Controller";
48
52
  readonly description: "Management of External Squads.";
49
53
  };
50
- readonly NODES: {
51
- readonly tag: "Nodes Controller";
52
- readonly description: "";
53
- };
54
54
  readonly HOSTS: {
55
55
  readonly tag: "Hosts Controller";
56
56
  readonly description: "";
@@ -75,10 +75,6 @@ export declare const CONTROLLERS_INFO: {
75
75
  readonly tag: "System Controller";
76
76
  readonly description: "";
77
77
  };
78
- readonly BANDWIDTH_STATS: {
79
- readonly tag: "Bandwidth Stats Controller";
80
- readonly description: "";
81
- };
82
78
  readonly KEYGEN: {
83
79
  readonly tag: "Keygen Controller";
84
80
  readonly description: "Generation of SSL_CERT for Remnawave Node.";
@@ -1 +1 @@
1
- {"version":3,"file":"controllers-info.d.ts","sourceRoot":"","sources":["../../../api/controllers-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwGnB,CAAC"}
1
+ {"version":3,"file":"controllers-info.d.ts","sourceRoot":"","sources":["../../../api/controllers-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGnB,CAAC"}
@@ -22,10 +22,6 @@ exports.CONTROLLERS_INFO = {
22
22
  tag: 'Users Bulk Actions Controller',
23
23
  description: 'Bulk actions with users.',
24
24
  },
25
- USERS_STATS: {
26
- tag: 'Users Stats Controller',
27
- description: '',
28
- },
29
25
  HWID_USER_DEVICES: {
30
26
  tag: 'HWID User Devices Controller',
31
27
  description: '',
@@ -38,6 +34,14 @@ exports.CONTROLLERS_INFO = {
38
34
  tag: '[Protected] Subscriptions Controller',
39
35
  description: 'Methods of this controller are protected with auth, most of them is returning the same informations as public Subscription Controller.',
40
36
  },
37
+ NODES: {
38
+ tag: 'Nodes Controller',
39
+ description: '',
40
+ },
41
+ BANDWIDTH_STATS: {
42
+ tag: 'Bandwidth Stats Controller',
43
+ description: '',
44
+ },
41
45
  CONFIG_PROFILES: {
42
46
  tag: 'Config Profiles Controller',
43
47
  description: 'Management of Config Profiles.',
@@ -50,10 +54,6 @@ exports.CONTROLLERS_INFO = {
50
54
  tag: 'External Squads Controller',
51
55
  description: 'Management of External Squads.',
52
56
  },
53
- NODES: {
54
- tag: 'Nodes Controller',
55
- description: '',
56
- },
57
57
  HOSTS: {
58
58
  tag: 'Hosts Controller',
59
59
  description: '',
@@ -78,10 +78,6 @@ exports.CONTROLLERS_INFO = {
78
78
  tag: 'System Controller',
79
79
  description: '',
80
80
  },
81
- BANDWIDTH_STATS: {
82
- tag: 'Bandwidth Stats Controller',
83
- description: '',
84
- },
85
81
  KEYGEN: {
86
82
  tag: 'Keygen Controller',
87
83
  description: 'Generation of SSL_CERT for Remnawave Node.',
@@ -52,11 +52,6 @@ export declare const REST_API: {
52
52
  readonly BULK_ACTIONS: {
53
53
  readonly PROFILE_MODIFICATION: "/api/nodes/bulk-actions/profile-modification";
54
54
  };
55
- readonly STATS: {
56
- readonly USAGE_BY_RANGE: "/api/nodes/usage/range";
57
- readonly USAGE_BY_RANGE_USER: (uuid: string) => string;
58
- readonly USAGE_REALTIME: "/api/nodes/usage/realtime";
59
- };
60
55
  };
61
56
  readonly USERS: {
62
57
  readonly CREATE: "/api/users/";
@@ -95,9 +90,6 @@ export declare const REST_API: {
95
90
  readonly EXTEND_EXPIRATION_DATE: "/api/users/bulk/all/extend-expiration-date";
96
91
  };
97
92
  };
98
- readonly STATS: {
99
- readonly GET_USAGE_BY_RANGE: (uuid: string) => string;
100
- };
101
93
  readonly TAGS: {
102
94
  readonly GET: "/api/users/tags";
103
95
  };
@@ -259,5 +251,23 @@ export declare const REST_API: {
259
251
  readonly CLONE: "/api/subscription-page-configs/actions/clone";
260
252
  };
261
253
  };
254
+ readonly BANDWIDTH_STATS: {
255
+ readonly NODES: {
256
+ readonly GET: "/api/bandwidth-stats/";
257
+ readonly GET_REALTIME: "/api/bandwidth-stats/realtime";
258
+ readonly GET_USERS: (uuid: string) => string;
259
+ };
260
+ readonly USERS: {
261
+ readonly GET_BY_UUID: (uuid: string) => string;
262
+ };
263
+ readonly LEGACY: {
264
+ readonly NODES: {
265
+ readonly GET_USERS: (uuid: string) => string;
266
+ };
267
+ readonly USERS: {
268
+ readonly GET_BY_UUID: (uuid: string) => string;
269
+ };
270
+ };
271
+ };
262
272
  };
263
273
  //# sourceMappingURL=routes.d.ts.map
@@ -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,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;gCAyBE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;;;;oCAOF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;2CAKA,MAAM;;;;;;;;iDAaA,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;8BAOzB,MAAM;6CAES,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;;;gDAqBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAmCT,MAAM;;gCAKH,MAAM;;;;;;;;;;;;;;mDAiBa,MAAM;;;;;;;;;0CAYf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;6CAMV,MAAM;;;;;;;qCAUd,MAAM;gCAIX,MAAM;sDAIgB,MAAM;6DAIC,MAAM;;;;;;;;;;qCAa9B,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;;;;yCAYP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;;;;;;;;;;;qCAiBjB,MAAM;gCAIX,MAAM;;uCAKC,MAAM;0CAEH,MAAM;;;;;;;;;;;6BAYnB,MAAM;;;gCAIH,MAAM;;;;;;;CAQnB,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,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;gCAyBE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;;;;oCAOF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;2CAKA,MAAM;;;;;;;;;;;gCAejB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;8BAOzB,MAAM;6CAES,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;;;;;;;kCAyBJ,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAmCT,MAAM;;gCAKH,MAAM;;;;;;;;;;;;;;mDAiBa,MAAM;;;;;;;;;0CAYf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;6CAMV,MAAM;;;;;;;qCAUd,MAAM;gCAIX,MAAM;sDAIgB,MAAM;6DAIC,MAAM;;;;;;;;;;qCAa9B,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;;;;yCAWP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;;;;;;;;;;;qCAiBjB,MAAM;gCAIX,MAAM;;uCAKC,MAAM;0CAEH,MAAM;;;;;;;;;;;6BAYnB,MAAM;;;gCAIH,MAAM;;;;;;;;;;;uCAYC,MAAM;;;yCAIJ,MAAM;;;;2CAKJ,MAAM;;;6CAIJ,MAAM;;;;CAKhC,CAAC"}
@@ -89,11 +89,6 @@ exports.REST_API = {
89
89
  BULK_ACTIONS: {
90
90
  PROFILE_MODIFICATION: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.BULK_ACTIONS.PROFILE_MODIFICATION}`,
91
91
  },
92
- STATS: {
93
- USAGE_BY_RANGE: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_BY_RANGE}`,
94
- USAGE_BY_RANGE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_BY_RANGE_USER(uuid)}`,
95
- USAGE_REALTIME: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_REALTIME}`,
96
- },
97
92
  },
98
93
  USERS: {
99
94
  CREATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.CREATE}`,
@@ -132,9 +127,6 @@ exports.REST_API = {
132
127
  EXTEND_EXPIRATION_DATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.ALL.EXTEND_EXPIRATION_DATE}`,
133
128
  },
134
129
  },
135
- STATS: {
136
- GET_USAGE_BY_RANGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.STATS.GET_USAGE_BY_RANGE(uuid)}`,
137
- },
138
130
  TAGS: {
139
131
  GET: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.TAGS.GET}`,
140
132
  },
@@ -296,4 +288,22 @@ exports.REST_API = {
296
288
  CLONE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PAGE_CONFIGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_PAGE_CONFIGS_ROUTES.ACTIONS.CLONE}`,
297
289
  },
298
290
  },
291
+ BANDWIDTH_STATS: {
292
+ NODES: {
293
+ GET: `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.NODES.GET}`,
294
+ GET_REALTIME: `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.NODES.GET_REALTIME}`,
295
+ GET_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.NODES.GET_USERS(uuid)}`,
296
+ },
297
+ USERS: {
298
+ GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.USERS.GET_BY_UUID(uuid)}`,
299
+ },
300
+ LEGACY: {
301
+ NODES: {
302
+ GET_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.LEGACY.NODES.GET_USERS(uuid)}`,
303
+ },
304
+ USERS: {
305
+ GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.LEGACY.USERS.GET_BY_UUID(uuid)}`,
306
+ },
307
+ },
308
+ },
299
309
  };
@@ -0,0 +1,4 @@
1
+ export * from './legacy';
2
+ export * from './nodes';
3
+ export * from './users';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/bandwidth-stats/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./get-node-user-usage-by-range.command"), exports);
18
- __exportStar(require("./get-nodes-usage-by-range.command"), exports);
19
- __exportStar(require("./get-realtime-usage.command"), exports);
17
+ __exportStar(require("./legacy"), exports);
18
+ __exportStar(require("./nodes"), exports);
19
+ __exportStar(require("./users"), exports);
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare namespace GetNodeUserUsageByRangeCommand {
2
+ export declare namespace GetLegacyStatsNodeUserUsageCommand {
3
3
  const url: (uuid: string) => string;
4
4
  const TSQ_url: string;
5
5
  const endpointDetails: import("../../../constants").EndpointDetails;
@@ -61,4 +61,4 @@ export declare namespace GetNodeUserUsageByRangeCommand {
61
61
  }>;
62
62
  type Response = z.infer<typeof ResponseSchema>;
63
63
  }
64
- //# sourceMappingURL=get-node-user-usage-by-range.command.d.ts.map
64
+ //# sourceMappingURL=get-legacy-stats-node-user-usage.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-legacy-stats-node-user-usage.command.d.ts","sourceRoot":"","sources":["../../../../../commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kCAAkC,CAAC;IACzC,MAAM,GAAG,0BAAkD,CAAC;IAC5D,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,kBAAkB;;;;;;;;;MAG7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetLegacyStatsNodeUserUsageCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../../api");
6
+ const constants_1 = require("../../../constants");
7
+ var GetLegacyStatsNodeUserUsageCommand;
8
+ (function (GetLegacyStatsNodeUserUsageCommand) {
9
+ GetLegacyStatsNodeUserUsageCommand.url = api_1.REST_API.BANDWIDTH_STATS.LEGACY.NODES.GET_USERS;
10
+ GetLegacyStatsNodeUserUsageCommand.TSQ_url = GetLegacyStatsNodeUserUsageCommand.url(':uuid');
11
+ GetLegacyStatsNodeUserUsageCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.BANDWIDTH_STATS_ROUTES.LEGACY.NODES.GET_USERS(':uuid'), 'get', 'Get Node User Usage by Range and Node UUID (Legacy)');
12
+ GetLegacyStatsNodeUserUsageCommand.RequestSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ });
15
+ GetLegacyStatsNodeUserUsageCommand.RequestQuerySchema = zod_1.z.object({
16
+ start: zod_1.z.string(),
17
+ end: zod_1.z.string(),
18
+ });
19
+ GetLegacyStatsNodeUserUsageCommand.ResponseSchema = zod_1.z.object({
20
+ response: zod_1.z.array(zod_1.z.object({
21
+ userUuid: zod_1.z.string().uuid(),
22
+ username: zod_1.z.string(),
23
+ nodeUuid: zod_1.z.string().uuid(),
24
+ total: zod_1.z.number(),
25
+ date: zod_1.z.string().transform((str) => new Date(str)),
26
+ })),
27
+ });
28
+ })(GetLegacyStatsNodeUserUsageCommand || (exports.GetLegacyStatsNodeUserUsageCommand = GetLegacyStatsNodeUserUsageCommand = {}));
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
- export declare namespace GetUserUsageByRangeCommand {
2
+ export declare namespace GetLegacyStatsUserUsageCommand {
3
3
  const url: (uuid: string) => string;
4
4
  const TSQ_url: string;
5
- const endpointDetails: import("../../constants").EndpointDetails;
5
+ const endpointDetails: import("../../../constants").EndpointDetails;
6
6
  const RequestSchema: z.ZodObject<{
7
7
  uuid: z.ZodString;
8
8
  }, "strip", z.ZodTypeAny, {
@@ -32,38 +32,38 @@ export declare namespace GetUserUsageByRangeCommand {
32
32
  date: z.ZodEffects<z.ZodString, Date, string>;
33
33
  }, "strip", z.ZodTypeAny, {
34
34
  date: Date;
35
- countryCode: string;
36
35
  userUuid: string;
37
36
  nodeUuid: string;
38
- nodeName: string;
39
37
  total: number;
38
+ nodeName: string;
39
+ countryCode: string;
40
40
  }, {
41
41
  date: string;
42
- countryCode: string;
43
42
  userUuid: string;
44
43
  nodeUuid: string;
45
- nodeName: string;
46
44
  total: number;
45
+ nodeName: string;
46
+ countryCode: string;
47
47
  }>, "many">;
48
48
  }, "strip", z.ZodTypeAny, {
49
49
  response: {
50
50
  date: Date;
51
- countryCode: string;
52
51
  userUuid: string;
53
52
  nodeUuid: string;
54
- nodeName: string;
55
53
  total: number;
54
+ nodeName: string;
55
+ countryCode: string;
56
56
  }[];
57
57
  }, {
58
58
  response: {
59
59
  date: string;
60
- countryCode: string;
61
60
  userUuid: string;
62
61
  nodeUuid: string;
63
- nodeName: string;
64
62
  total: number;
63
+ nodeName: string;
64
+ countryCode: string;
65
65
  }[];
66
66
  }>;
67
67
  type Response = z.infer<typeof ResponseSchema>;
68
68
  }
69
- //# sourceMappingURL=get-user-usage-by-range.command.d.ts.map
69
+ //# sourceMappingURL=get-legacy-user-usage.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-legacy-user-usage.command.d.ts","sourceRoot":"","sources":["../../../../../commands/bandwidth-stats/legacy/get-legacy-user-usage.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,GAAG,0BAAoD,CAAC;IAC9D,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,kBAAkB;;;;;;;;;MAG7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetLegacyStatsUserUsageCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../../api");
6
+ const constants_1 = require("../../../constants");
7
+ var GetLegacyStatsUserUsageCommand;
8
+ (function (GetLegacyStatsUserUsageCommand) {
9
+ GetLegacyStatsUserUsageCommand.url = api_1.REST_API.BANDWIDTH_STATS.LEGACY.USERS.GET_BY_UUID;
10
+ GetLegacyStatsUserUsageCommand.TSQ_url = GetLegacyStatsUserUsageCommand.url(':uuid');
11
+ GetLegacyStatsUserUsageCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.BANDWIDTH_STATS_ROUTES.LEGACY.USERS.GET_BY_UUID(':uuid'), 'get', 'Get User Usage by Range (Legacy)');
12
+ GetLegacyStatsUserUsageCommand.RequestSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ });
15
+ GetLegacyStatsUserUsageCommand.RequestQuerySchema = zod_1.z.object({
16
+ start: zod_1.z.string(),
17
+ end: zod_1.z.string(),
18
+ });
19
+ GetLegacyStatsUserUsageCommand.ResponseSchema = zod_1.z.object({
20
+ response: zod_1.z.array(zod_1.z.object({
21
+ userUuid: zod_1.z.string().uuid(),
22
+ nodeUuid: zod_1.z.string().uuid(),
23
+ nodeName: zod_1.z.string(),
24
+ countryCode: zod_1.z.string(),
25
+ total: zod_1.z.number(),
26
+ date: zod_1.z.string().transform((str) => new Date(str)),
27
+ })),
28
+ });
29
+ })(GetLegacyStatsUserUsageCommand || (exports.GetLegacyStatsUserUsageCommand = GetLegacyStatsUserUsageCommand = {}));
@@ -0,0 +1,3 @@
1
+ export * from './get-legacy-stats-node-user-usage.command';
2
+ export * from './get-legacy-user-usage.command';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/bandwidth-stats/legacy/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,iCAAiC,CAAC"}
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./get-node-user-usage-by-range.command"), exports);
18
- __exportStar(require("./get-nodes-usage-by-range.command"), exports);
19
- __exportStar(require("./get-realtime-usage.command"), exports);
17
+ __exportStar(require("./get-legacy-stats-node-user-usage.command"), exports);
18
+ __exportStar(require("./get-legacy-user-usage.command"), exports);
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
- export declare namespace GetNodesRealtimeUsageCommand {
3
- const url: "/api/nodes/usage/realtime";
4
- const TSQ_url: "/api/nodes/usage/realtime";
2
+ export declare namespace GetStatsNodesRealtimeUsageCommand {
3
+ const url: "/api/bandwidth-stats/realtime";
4
+ const TSQ_url: "/api/bandwidth-stats/realtime";
5
5
  const endpointDetails: import("../../../constants").EndpointDetails;
6
6
  const ResponseSchema: z.ZodObject<{
7
7
  response: z.ZodArray<z.ZodObject<{
@@ -15,9 +15,9 @@ export declare namespace GetNodesRealtimeUsageCommand {
15
15
  uploadSpeedBps: z.ZodNumber;
16
16
  totalSpeedBps: z.ZodNumber;
17
17
  }, "strip", z.ZodTypeAny, {
18
- countryCode: string;
19
18
  nodeUuid: string;
20
19
  nodeName: string;
20
+ countryCode: string;
21
21
  downloadBytes: number;
22
22
  uploadBytes: number;
23
23
  totalBytes: number;
@@ -25,9 +25,9 @@ export declare namespace GetNodesRealtimeUsageCommand {
25
25
  uploadSpeedBps: number;
26
26
  totalSpeedBps: number;
27
27
  }, {
28
- countryCode: string;
29
28
  nodeUuid: string;
30
29
  nodeName: string;
30
+ countryCode: string;
31
31
  downloadBytes: number;
32
32
  uploadBytes: number;
33
33
  totalBytes: number;
@@ -37,9 +37,9 @@ export declare namespace GetNodesRealtimeUsageCommand {
37
37
  }>, "many">;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  response: {
40
- countryCode: string;
41
40
  nodeUuid: string;
42
41
  nodeName: string;
42
+ countryCode: string;
43
43
  downloadBytes: number;
44
44
  uploadBytes: number;
45
45
  totalBytes: number;
@@ -49,9 +49,9 @@ export declare namespace GetNodesRealtimeUsageCommand {
49
49
  }[];
50
50
  }, {
51
51
  response: {
52
- countryCode: string;
53
52
  nodeUuid: string;
54
53
  nodeName: string;
54
+ countryCode: string;
55
55
  downloadBytes: number;
56
56
  uploadBytes: number;
57
57
  totalBytes: number;
@@ -62,4 +62,4 @@ export declare namespace GetNodesRealtimeUsageCommand {
62
62
  }>;
63
63
  type Response = z.infer<typeof ResponseSchema>;
64
64
  }
65
- //# sourceMappingURL=get-realtime-usage.command.d.ts.map
65
+ //# sourceMappingURL=get-stats-nodes-realtime-usage.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-stats-nodes-realtime-usage.command.d.ts","sourceRoot":"","sources":["../../../../../commands/bandwidth-stats/nodes/get-stats-nodes-realtime-usage.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iCAAiC,CAAC;IACxC,MAAM,GAAG,iCAA8C,CAAC;IACxD,MAAM,OAAO,iCAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAczB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetStatsNodesRealtimeUsageCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../../api");
6
+ const constants_1 = require("../../../constants");
7
+ var GetStatsNodesRealtimeUsageCommand;
8
+ (function (GetStatsNodesRealtimeUsageCommand) {
9
+ GetStatsNodesRealtimeUsageCommand.url = api_1.REST_API.BANDWIDTH_STATS.NODES.GET_REALTIME;
10
+ GetStatsNodesRealtimeUsageCommand.TSQ_url = GetStatsNodesRealtimeUsageCommand.url;
11
+ GetStatsNodesRealtimeUsageCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.BANDWIDTH_STATS_ROUTES.NODES.GET_REALTIME, 'get', 'Get Nodes Realtime Usage');
12
+ GetStatsNodesRealtimeUsageCommand.ResponseSchema = zod_1.z.object({
13
+ response: zod_1.z.array(zod_1.z.object({
14
+ nodeUuid: zod_1.z.string().uuid(),
15
+ nodeName: zod_1.z.string(),
16
+ countryCode: zod_1.z.string(),
17
+ downloadBytes: zod_1.z.number(),
18
+ uploadBytes: zod_1.z.number(),
19
+ totalBytes: zod_1.z.number(),
20
+ downloadSpeedBps: zod_1.z.number(),
21
+ uploadSpeedBps: zod_1.z.number(),
22
+ totalSpeedBps: zod_1.z.number(),
23
+ })),
24
+ });
25
+ })(GetStatsNodesRealtimeUsageCommand || (exports.GetStatsNodesRealtimeUsageCommand = GetStatsNodesRealtimeUsageCommand = {}));