@remnawave/backend-contract 3.1.1 → 3.2.0
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.
- package/build/backend/api/controllers/system.d.ts +1 -0
- package/build/backend/api/controllers/system.d.ts.map +1 -1
- package/build/backend/api/controllers/system.js +1 -0
- package/build/backend/api/routes.d.ts +1 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +1 -0
- package/build/backend/commands/system/get-configuration.command.d.ts +29 -0
- package/build/backend/commands/system/get-configuration.command.d.ts.map +1 -0
- package/build/backend/commands/system/get-configuration.command.js +53 -0
- package/build/backend/commands/system/index.d.ts +1 -0
- package/build/backend/commands/system/index.d.ts.map +1 -1
- package/build/backend/commands/system/index.js +1 -0
- package/build/frontend/api/controllers/system.js +1 -0
- package/build/frontend/api/routes.js +1 -0
- package/build/frontend/commands/system/get-configuration.command.js +53 -0
- package/build/frontend/commands/system/index.js +1 -0
- package/package.json +1 -1
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;CAmBhB,CAAC"}
|
|
@@ -125,6 +125,7 @@ export declare const REST_API: {
|
|
|
125
125
|
readonly SYSTEM: {
|
|
126
126
|
readonly HEALTH: "/api/system/health";
|
|
127
127
|
readonly METADATA: "/api/system/metadata";
|
|
128
|
+
readonly CONFIGURATION: "/api/system/configuration";
|
|
128
129
|
readonly STATS: {
|
|
129
130
|
readonly SYSTEM_STATS: "/api/system/stats";
|
|
130
131
|
readonly BANDWIDTH_STATS: "/api/system/stats/bandwidth";
|
|
@@ -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;AAE9C,eAAO,MAAM,kBAAkB,EAAG,gBAAyB,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAG,uBAAgC,CAAC;AAC/D,eAAO,MAAM,YAAY,EAAG,wBAAiC,CAAC;AAC9D,eAAO,MAAM,WAAW,EAAG,uBAAgC,CAAC;AAE5D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;gCAyBE,MAAM;;;;;;;;;;;qCAcD,MAAM;;gCAGX,MAAM;;;;;oCAOF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;2CAKA,MAAM;;;;;;;;;;;;;;kCAkBf,MAAM;qCAGH,MAAM;4CAEC,MAAM;wDAEM,MAAM;;uCAMvB,MAAM;sCAIP,MAAM;6CAIC,MAAM;mDAIA,MAAM;sDAIH,MAAM;;;6CAMf,MAAM;0CAIT,MAAM;;;;;;;;;;;;;;;;;;;;;;kCAyBd,MAAM;uCAED,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM
|
|
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;AAE9C,eAAO,MAAM,kBAAkB,EAAG,gBAAyB,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAG,uBAAgC,CAAC;AAC/D,eAAO,MAAM,YAAY,EAAG,wBAAiC,CAAC;AAC9D,eAAO,MAAM,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H,MAAM;;;CAIzB,CAAC"}
|
|
@@ -162,6 +162,7 @@ exports.REST_API = {
|
|
|
162
162
|
SYSTEM: {
|
|
163
163
|
HEALTH: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.HEALTH}`,
|
|
164
164
|
METADATA: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.METADATA}`,
|
|
165
|
+
CONFIGURATION: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.CONFIGURATION}`,
|
|
165
166
|
STATS: {
|
|
166
167
|
SYSTEM_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.SYSTEM_STATS}`,
|
|
167
168
|
BANDWIDTH_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.BANDWIDTH_STATS}`,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace GetConfigurationCommand {
|
|
3
|
+
const url: "/api/system/configuration";
|
|
4
|
+
const TSQ_url: "/api/system/configuration";
|
|
5
|
+
const endpointDetails: import("../../constants").EndpointDetails;
|
|
6
|
+
const ResponseSchema: z.ZodObject<{
|
|
7
|
+
response: z.ZodObject<{
|
|
8
|
+
notifications: z.ZodObject<{
|
|
9
|
+
webhook: z.ZodBoolean;
|
|
10
|
+
bandwidthUsage: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
|
|
11
|
+
notConnectedAfter: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
|
|
12
|
+
expirationNotifications: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
service: z.ZodObject<{
|
|
15
|
+
cleanUsageHistory: z.ZodBoolean;
|
|
16
|
+
disableUserUsageRecords: z.ZodBoolean;
|
|
17
|
+
disableSrhRecords: z.ZodBoolean;
|
|
18
|
+
exportToRedisStream: z.ZodBoolean;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
misc: z.ZodObject<{
|
|
21
|
+
shortUuidLength: z.ZodNumber;
|
|
22
|
+
subPublicDomain: z.ZodString;
|
|
23
|
+
userUsageIgnoreBelowBytes: z.ZodNumber;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=get-configuration.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-configuration.command.d.ts","sourceRoot":"","sources":["../../../../commands/system/get-configuration.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,6BAAgC,CAAC;IAC1C,MAAM,OAAO,6BAAM,CAAC;IAEpB,MAAM,eAAe,2CAM3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;qBAwCzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetConfigurationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var GetConfigurationCommand;
|
|
8
|
+
(function (GetConfigurationCommand) {
|
|
9
|
+
GetConfigurationCommand.url = api_1.REST_API.SYSTEM.CONFIGURATION;
|
|
10
|
+
GetConfigurationCommand.TSQ_url = GetConfigurationCommand.url;
|
|
11
|
+
GetConfigurationCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.CONFIGURATION, 'get', 'Get Remnawave Configuration', { scope: 'configuration', kind: 'read' }, 'Returns some of the configuration values.');
|
|
12
|
+
GetConfigurationCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.object({
|
|
14
|
+
notifications: zod_1.z.object({
|
|
15
|
+
webhook: zod_1.z.boolean().meta({
|
|
16
|
+
description: 'WEBHOOK_ENABLED',
|
|
17
|
+
}),
|
|
18
|
+
bandwidthUsage: zod_1.z.array(zod_1.z.number()).nullable().meta({
|
|
19
|
+
description: 'BANDWIDTH_USAGE_NOTIFICATIONS_THRESHOLD',
|
|
20
|
+
}),
|
|
21
|
+
notConnectedAfter: zod_1.z.array(zod_1.z.number()).nullable().meta({
|
|
22
|
+
description: 'NOT_CONNECTED_USERS_NOTIFICATIONS_AFTER_HOURS',
|
|
23
|
+
}),
|
|
24
|
+
expirationNotifications: zod_1.z.array(zod_1.z.number()).nullable().meta({
|
|
25
|
+
description: 'EXPIRATION_NOTIFICATIONS',
|
|
26
|
+
}),
|
|
27
|
+
}),
|
|
28
|
+
service: zod_1.z.object({
|
|
29
|
+
cleanUsageHistory: zod_1.z.boolean().meta({
|
|
30
|
+
description: 'SERVICE_CLEAN_USAGE_HISTORY',
|
|
31
|
+
}),
|
|
32
|
+
disableUserUsageRecords: zod_1.z.boolean().meta({
|
|
33
|
+
description: 'SERVICE_DISABLE_USER_USAGE_RECORDS',
|
|
34
|
+
}),
|
|
35
|
+
disableSrhRecords: zod_1.z.boolean().meta({
|
|
36
|
+
description: 'SERVICE_DISABLE_SRH_RECORDS',
|
|
37
|
+
}),
|
|
38
|
+
exportToRedisStream: zod_1.z.boolean().meta({
|
|
39
|
+
description: 'EXPORT_TO_STREAM_ENABLED',
|
|
40
|
+
}),
|
|
41
|
+
}),
|
|
42
|
+
misc: zod_1.z.object({
|
|
43
|
+
shortUuidLength: zod_1.z.number().meta({
|
|
44
|
+
description: 'SHORT_UUID_LENGTH',
|
|
45
|
+
}),
|
|
46
|
+
subPublicDomain: zod_1.z.string(),
|
|
47
|
+
userUsageIgnoreBelowBytes: zod_1.z.number().meta({
|
|
48
|
+
description: 'USER_USAGE_IGNORE_BELOW_BYTES',
|
|
49
|
+
}),
|
|
50
|
+
}),
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
})(GetConfigurationCommand || (exports.GetConfigurationCommand = GetConfigurationCommand = {}));
|
|
@@ -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,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,0BAA0B,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,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
|
|
@@ -25,3 +25,4 @@ __exportStar(require("./get-stats.command"), exports);
|
|
|
25
25
|
__exportStar(require("./testers"), exports);
|
|
26
26
|
__exportStar(require("./tools"), exports);
|
|
27
27
|
__exportStar(require("./get-http-stats.command"), exports);
|
|
28
|
+
__exportStar(require("./get-configuration.command"), exports);
|
|
@@ -162,6 +162,7 @@ exports.REST_API = {
|
|
|
162
162
|
SYSTEM: {
|
|
163
163
|
HEALTH: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.HEALTH}`,
|
|
164
164
|
METADATA: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.METADATA}`,
|
|
165
|
+
CONFIGURATION: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.CONFIGURATION}`,
|
|
165
166
|
STATS: {
|
|
166
167
|
SYSTEM_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.SYSTEM_STATS}`,
|
|
167
168
|
BANDWIDTH_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.BANDWIDTH_STATS}`,
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetConfigurationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var GetConfigurationCommand;
|
|
8
|
+
(function (GetConfigurationCommand) {
|
|
9
|
+
GetConfigurationCommand.url = api_1.REST_API.SYSTEM.CONFIGURATION;
|
|
10
|
+
GetConfigurationCommand.TSQ_url = GetConfigurationCommand.url;
|
|
11
|
+
GetConfigurationCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.CONFIGURATION, 'get', 'Get Remnawave Configuration', { scope: 'configuration', kind: 'read' }, 'Returns some of the configuration values.');
|
|
12
|
+
GetConfigurationCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.object({
|
|
14
|
+
notifications: zod_1.z.object({
|
|
15
|
+
webhook: zod_1.z.boolean().meta({
|
|
16
|
+
description: 'WEBHOOK_ENABLED',
|
|
17
|
+
}),
|
|
18
|
+
bandwidthUsage: zod_1.z.array(zod_1.z.number()).nullable().meta({
|
|
19
|
+
description: 'BANDWIDTH_USAGE_NOTIFICATIONS_THRESHOLD',
|
|
20
|
+
}),
|
|
21
|
+
notConnectedAfter: zod_1.z.array(zod_1.z.number()).nullable().meta({
|
|
22
|
+
description: 'NOT_CONNECTED_USERS_NOTIFICATIONS_AFTER_HOURS',
|
|
23
|
+
}),
|
|
24
|
+
expirationNotifications: zod_1.z.array(zod_1.z.number()).nullable().meta({
|
|
25
|
+
description: 'EXPIRATION_NOTIFICATIONS',
|
|
26
|
+
}),
|
|
27
|
+
}),
|
|
28
|
+
service: zod_1.z.object({
|
|
29
|
+
cleanUsageHistory: zod_1.z.boolean().meta({
|
|
30
|
+
description: 'SERVICE_CLEAN_USAGE_HISTORY',
|
|
31
|
+
}),
|
|
32
|
+
disableUserUsageRecords: zod_1.z.boolean().meta({
|
|
33
|
+
description: 'SERVICE_DISABLE_USER_USAGE_RECORDS',
|
|
34
|
+
}),
|
|
35
|
+
disableSrhRecords: zod_1.z.boolean().meta({
|
|
36
|
+
description: 'SERVICE_DISABLE_SRH_RECORDS',
|
|
37
|
+
}),
|
|
38
|
+
exportToRedisStream: zod_1.z.boolean().meta({
|
|
39
|
+
description: 'EXPORT_TO_STREAM_ENABLED',
|
|
40
|
+
}),
|
|
41
|
+
}),
|
|
42
|
+
misc: zod_1.z.object({
|
|
43
|
+
shortUuidLength: zod_1.z.number().meta({
|
|
44
|
+
description: 'SHORT_UUID_LENGTH',
|
|
45
|
+
}),
|
|
46
|
+
subPublicDomain: zod_1.z.string(),
|
|
47
|
+
userUsageIgnoreBelowBytes: zod_1.z.number().meta({
|
|
48
|
+
description: 'USER_USAGE_IGNORE_BELOW_BYTES',
|
|
49
|
+
}),
|
|
50
|
+
}),
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
})(GetConfigurationCommand || (exports.GetConfigurationCommand = GetConfigurationCommand = {}));
|
|
@@ -25,3 +25,4 @@ __exportStar(require("./get-stats.command"), exports);
|
|
|
25
25
|
__exportStar(require("./testers"), exports);
|
|
26
26
|
__exportStar(require("./tools"), exports);
|
|
27
27
|
__exportStar(require("./get-http-stats.command"), exports);
|
|
28
|
+
__exportStar(require("./get-configuration.command"), exports);
|
package/package.json
CHANGED