@remnawave/backend-contract 2.6.43 → 2.6.44

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.
@@ -4,6 +4,7 @@ export declare const SYSTEM_ROUTES: {
4
4
  readonly SYSTEM_STATS: "stats";
5
5
  readonly BANDWIDTH_STATS: "stats/bandwidth";
6
6
  readonly NODES_STATS: "stats/nodes";
7
+ readonly RECAP: "stats/recap";
7
8
  readonly NODES_METRICS: "nodes/metrics";
8
9
  };
9
10
  readonly TOOLS: {
@@ -1 +1 @@
1
- {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../api/controllers/system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;CAgBhB,CAAC"}
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../api/controllers/system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAiBhB,CAAC"}
@@ -7,6 +7,7 @@ exports.SYSTEM_ROUTES = {
7
7
  SYSTEM_STATS: 'stats',
8
8
  BANDWIDTH_STATS: 'stats/bandwidth',
9
9
  NODES_STATS: 'stats/nodes',
10
+ RECAP: 'stats/recap',
10
11
  NODES_METRICS: 'nodes/metrics',
11
12
  },
12
13
  TOOLS: {
@@ -129,6 +129,7 @@ export declare const REST_API: {
129
129
  readonly BANDWIDTH_STATS: "/api/system/stats/bandwidth";
130
130
  readonly NODES_STATS: "/api/system/stats/nodes";
131
131
  readonly NODES_METRICS: "/api/system/nodes/metrics";
132
+ readonly RECAP: "/api/system/stats/recap";
132
133
  };
133
134
  readonly TOOLS: {
134
135
  readonly GENERATE_X25519: "/api/system/tools/x25519/generate";
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/rout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;0CAEH,MAAM;;;;;;;;;;yCAWP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;;;;;;;;;;;qCAiBjB,MAAM;gCAIX,MAAM;;uCAKC,MAAM;0CAEH,MAAM;;;;;;;;;;;6BAYnB,MAAM;;;gCAIH,MAAM;;;;;;;;6BAST,MAAM;;;gCAIH,MAAM;;;;;;;;;;;;;;;;;uCAkBC,MAAM;;;yCAIJ,MAAM;;;;2CAKJ,MAAM;;;6CAIJ,MAAM;;;;;mCAMhB,MAAM;+CAEM,MAAM;;6CAGR,MAAM;qDAEE,MAAM;;;;iCAK1B,MAAM;oCAEH,MAAM;;;iCAIT,MAAM;oCAEH,MAAM;;;CAIvB,CAAC"}
@@ -166,6 +166,7 @@ exports.REST_API = {
166
166
  BANDWIDTH_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.BANDWIDTH_STATS}`,
167
167
  NODES_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.NODES_STATS}`,
168
168
  NODES_METRICS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.NODES_METRICS}`,
169
+ RECAP: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.RECAP}`,
169
170
  },
170
171
  TOOLS: {
171
172
  GENERATE_X25519: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.TOOLS.GENERATE_X25519}`,
@@ -0,0 +1,136 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetRecapCommand {
3
+ const url: "/api/system/stats/recap";
4
+ const TSQ_url: "/api/system/stats/recap";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const ResponseSchema: z.ZodObject<{
7
+ response: z.ZodObject<{
8
+ thisMonth: z.ZodObject<{
9
+ users: z.ZodNumber;
10
+ traffic: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ users: number;
13
+ traffic: string;
14
+ }, {
15
+ users: number;
16
+ traffic: string;
17
+ }>;
18
+ total: z.ZodObject<{
19
+ users: z.ZodNumber;
20
+ nodes: z.ZodNumber;
21
+ traffic: z.ZodString;
22
+ nodesRam: z.ZodString;
23
+ nodesCpuCores: z.ZodNumber;
24
+ distinctCountries: z.ZodNumber;
25
+ }, "strip", z.ZodTypeAny, {
26
+ nodes: number;
27
+ users: number;
28
+ traffic: string;
29
+ nodesRam: string;
30
+ nodesCpuCores: number;
31
+ distinctCountries: number;
32
+ }, {
33
+ nodes: number;
34
+ users: number;
35
+ traffic: string;
36
+ nodesRam: string;
37
+ nodesCpuCores: number;
38
+ distinctCountries: number;
39
+ }>;
40
+ online: z.ZodObject<{
41
+ users: z.ZodNumber;
42
+ nodes: z.ZodNumber;
43
+ }, "strip", z.ZodTypeAny, {
44
+ nodes: number;
45
+ users: number;
46
+ }, {
47
+ nodes: number;
48
+ users: number;
49
+ }>;
50
+ version: z.ZodString;
51
+ initDate: z.ZodEffects<z.ZodString, Date, string>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ total: {
54
+ nodes: number;
55
+ users: number;
56
+ traffic: string;
57
+ nodesRam: string;
58
+ nodesCpuCores: number;
59
+ distinctCountries: number;
60
+ };
61
+ version: string;
62
+ thisMonth: {
63
+ users: number;
64
+ traffic: string;
65
+ };
66
+ online: {
67
+ nodes: number;
68
+ users: number;
69
+ };
70
+ initDate: Date;
71
+ }, {
72
+ total: {
73
+ nodes: number;
74
+ users: number;
75
+ traffic: string;
76
+ nodesRam: string;
77
+ nodesCpuCores: number;
78
+ distinctCountries: number;
79
+ };
80
+ version: string;
81
+ thisMonth: {
82
+ users: number;
83
+ traffic: string;
84
+ };
85
+ online: {
86
+ nodes: number;
87
+ users: number;
88
+ };
89
+ initDate: string;
90
+ }>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ response: {
93
+ total: {
94
+ nodes: number;
95
+ users: number;
96
+ traffic: string;
97
+ nodesRam: string;
98
+ nodesCpuCores: number;
99
+ distinctCountries: number;
100
+ };
101
+ version: string;
102
+ thisMonth: {
103
+ users: number;
104
+ traffic: string;
105
+ };
106
+ online: {
107
+ nodes: number;
108
+ users: number;
109
+ };
110
+ initDate: Date;
111
+ };
112
+ }, {
113
+ response: {
114
+ total: {
115
+ nodes: number;
116
+ users: number;
117
+ traffic: string;
118
+ nodesRam: string;
119
+ nodesCpuCores: number;
120
+ distinctCountries: number;
121
+ };
122
+ version: string;
123
+ thisMonth: {
124
+ users: number;
125
+ traffic: string;
126
+ };
127
+ online: {
128
+ nodes: number;
129
+ users: number;
130
+ };
131
+ initDate: string;
132
+ };
133
+ }>;
134
+ type Response = z.infer<typeof ResponseSchema>;
135
+ }
136
+ //# sourceMappingURL=get-recap.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-recap.command.d.ts","sourceRoot":"","sources":["../../../../commands/system/get-recap.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,eAAe,CAAC;IACtB,MAAM,GAAG,2BAA8B,CAAC;IACxC,MAAM,OAAO,2BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwBzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRecapCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const api_1 = require("../../api");
7
+ var GetRecapCommand;
8
+ (function (GetRecapCommand) {
9
+ GetRecapCommand.url = api_1.REST_API.SYSTEM.STATS.RECAP;
10
+ GetRecapCommand.TSQ_url = GetRecapCommand.url;
11
+ GetRecapCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.STATS.RECAP, 'get', 'Get Recap');
12
+ GetRecapCommand.ResponseSchema = zod_1.z.object({
13
+ response: zod_1.z.object({
14
+ thisMonth: zod_1.z.object({
15
+ users: zod_1.z.number(),
16
+ traffic: zod_1.z.string(),
17
+ }),
18
+ total: zod_1.z.object({
19
+ users: zod_1.z.number(),
20
+ nodes: zod_1.z.number(),
21
+ traffic: zod_1.z.string(),
22
+ nodesRam: zod_1.z.string(),
23
+ nodesCpuCores: zod_1.z.number(),
24
+ distinctCountries: zod_1.z.number(),
25
+ }),
26
+ online: zod_1.z.object({
27
+ users: zod_1.z.number(),
28
+ nodes: zod_1.z.number(),
29
+ }),
30
+ version: zod_1.z.string(),
31
+ initDate: zod_1.z
32
+ .string()
33
+ .datetime({ local: true, offset: true })
34
+ .transform((str) => new Date(str)),
35
+ }),
36
+ });
37
+ })(GetRecapCommand || (exports.GetRecapCommand = GetRecapCommand = {}));
@@ -2,6 +2,7 @@ export * from './get-bandwidth-stats.command';
2
2
  export * from './get-metadata.command';
3
3
  export * from './get-nodes-metrics.command';
4
4
  export * from './get-nodes-statistics';
5
+ export * from './get-recap.command';
5
6
  export * from './get-remnawave-health.command';
6
7
  export * from './get-stats.command';
7
8
  export * from './testers';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/system/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/system/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
@@ -18,6 +18,7 @@ __exportStar(require("./get-bandwidth-stats.command"), exports);
18
18
  __exportStar(require("./get-metadata.command"), exports);
19
19
  __exportStar(require("./get-nodes-metrics.command"), exports);
20
20
  __exportStar(require("./get-nodes-statistics"), exports);
21
+ __exportStar(require("./get-recap.command"), exports);
21
22
  __exportStar(require("./get-remnawave-health.command"), exports);
22
23
  __exportStar(require("./get-stats.command"), exports);
23
24
  __exportStar(require("./testers"), exports);
@@ -7,6 +7,7 @@ exports.SYSTEM_ROUTES = {
7
7
  SYSTEM_STATS: 'stats',
8
8
  BANDWIDTH_STATS: 'stats/bandwidth',
9
9
  NODES_STATS: 'stats/nodes',
10
+ RECAP: 'stats/recap',
10
11
  NODES_METRICS: 'nodes/metrics',
11
12
  },
12
13
  TOOLS: {
@@ -166,6 +166,7 @@ exports.REST_API = {
166
166
  BANDWIDTH_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.BANDWIDTH_STATS}`,
167
167
  NODES_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.NODES_STATS}`,
168
168
  NODES_METRICS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.NODES_METRICS}`,
169
+ RECAP: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.RECAP}`,
169
170
  },
170
171
  TOOLS: {
171
172
  GENERATE_X25519: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.TOOLS.GENERATE_X25519}`,
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRecapCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const api_1 = require("../../api");
7
+ var GetRecapCommand;
8
+ (function (GetRecapCommand) {
9
+ GetRecapCommand.url = api_1.REST_API.SYSTEM.STATS.RECAP;
10
+ GetRecapCommand.TSQ_url = GetRecapCommand.url;
11
+ GetRecapCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.STATS.RECAP, 'get', 'Get Recap');
12
+ GetRecapCommand.ResponseSchema = zod_1.z.object({
13
+ response: zod_1.z.object({
14
+ thisMonth: zod_1.z.object({
15
+ users: zod_1.z.number(),
16
+ traffic: zod_1.z.string(),
17
+ }),
18
+ total: zod_1.z.object({
19
+ users: zod_1.z.number(),
20
+ nodes: zod_1.z.number(),
21
+ traffic: zod_1.z.string(),
22
+ nodesRam: zod_1.z.string(),
23
+ nodesCpuCores: zod_1.z.number(),
24
+ distinctCountries: zod_1.z.number(),
25
+ }),
26
+ online: zod_1.z.object({
27
+ users: zod_1.z.number(),
28
+ nodes: zod_1.z.number(),
29
+ }),
30
+ version: zod_1.z.string(),
31
+ initDate: zod_1.z
32
+ .string()
33
+ .datetime({ local: true, offset: true })
34
+ .transform((str) => new Date(str)),
35
+ }),
36
+ });
37
+ })(GetRecapCommand || (exports.GetRecapCommand = GetRecapCommand = {}));
@@ -18,6 +18,7 @@ __exportStar(require("./get-bandwidth-stats.command"), exports);
18
18
  __exportStar(require("./get-metadata.command"), exports);
19
19
  __exportStar(require("./get-nodes-metrics.command"), exports);
20
20
  __exportStar(require("./get-nodes-statistics"), exports);
21
+ __exportStar(require("./get-recap.command"), exports);
21
22
  __exportStar(require("./get-remnawave-health.command"), exports);
22
23
  __exportStar(require("./get-stats.command"), exports);
23
24
  __exportStar(require("./testers"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.6.43",
3
+ "version": "2.6.44",
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.",